Skip to content

Latest commit

 

History

History
117 lines (108 loc) · 4.79 KB

File metadata and controls

117 lines (108 loc) · 4.79 KB

Installation Guide

This guide provides instructions for both common users who want to use the prebuilt application files and advanced users interested in building the project from source.

Prebuilt Applications

.NET Application

  1. Download the Prebuilt Executable
    • Visit the Releases page and download the latest version of the DAIRemote.zip file.
  2. Run the Executable
    • Extract the downloaded files into a folder of your choice.
    • Double-click the .exe file to start the application.

Android Application

  1. Download the APK
    • Visit the Releases page and download the latest DAIRemote.apk file.
  2. Install the APK on Your Android Device
    • Transfer the APK to your Android device using a USB cable or cloud storage.
    • Open the APK file on your device. You may need to enable "Install Unknown Apps" from your device settings.
    • Follow the on-screen instructions to complete the installation.
  3. Run the Application
    • Locate the installed app on your device, tap it, and start using the application.

Building from Source

Dependencies

  • .NET SDK: Version 8.0 or higher (you can download it from here).
  • Visual Studio or VSCode (optional for development).
  • Android Studio

Installation Instructions

Clone The Repository

git clone https://github.com/your-username/DAIRemote.git
cd DAIRemote

Restore Dependencies

Run the following command to restore any NuGet packages:

dotnet restore

Build the Project

Compile the project to ensure everything is set up correctly:

dotnet build

Executing the Program

Navigate to the Project Directory

Ensure you're in the directory where the .csproj file is located:

cd DAIRemote

Run the Application

Start the application using the following command:

dotnet run

Running the Android Application

Option 1 (Using Smartphone):

  1. On your smartphone, go to Settings<About Phone<Software Information
    • Tap on "Build Number" 7 times in a row to enable Developer Mode.
  2. Exit back to the Settings Page and go to Developer Options
    • Connect your phone to your PC using a USB cable and click on USB Debugging to enable it.
  3. Open Android Studio
    • Now run the app ensuring the virtual device paired is with yours.
    • The Android applicationa should appear on your smartphone, ready to be used.

Option 2 (Using BlueStacks):

  • Download BlueStacks
  • Navigate to the folder where the APK file is stored (e.g. DAIRemoteApp/app/build/outputs/apk/debug)
  • Right-click on the APK file and select "Open with BlueStacks" and the Android app should run.

Option 3 (Command Line):

  1. Ensure Android SDK is in PATH:
    • Check if the SDK is located at:
      C:\Users\<yourUser>\AppData\Local\Android\Sdk
      
    • Replace <yourUser> with your user.
    • If necessary, add this path to your system environment variables.
  2. Add Emulator Path:
    • Add the following path to your system PATH variable:
      C:\Users\<yourUser>\AppData\Local\Android\Sdk\emulator
      
  3. Navigate to the Project Directory:
    cd DAIRemoteApp
  4. Build the APK using Gradle:
    • Android Studio projects use Gradle to build the APK. Use the following command to build your project:
    gradlew assembleDebug
  5. List All Available AVDs:
    emulator -list-avds
    • If no AVDs are available, you will need to create one. You can find a tutorial on creating an AVD here.
  6. Run the Emulator
    emulator -avd <yourAVD>
    • Replace <yourAVD> with the name of the AVD you wish to run.

Debugging

If you encounter an error after running gradlew assembleDebug related to having an older version of Java, follow these steps:

  1. Install Java 17 from here.
  2. After installation, open your environment variables settings:
    • Go to the System Properties.
    • Click on Environment Variables.
  3. Check if the JAVA_HOME variable is present. If not, add it:
    • Create a new system variable with the following:
      • Variable name: JAVA_HOME
      • Variable value: Path to your JDK 17 installation (e.g., C:\Program Files\Java\jdk-17).
  4. Edit the PATH variable:
    • Replace the existing path that points to the older JDK (e.g., C:\Program Files\Microsoft\jdk-11.0.16.101-hotspot\bin) with %JAVA_HOME%\bin.

After completing these steps, try running gradlew assembleDebug again.