Skip to content

SharkNet setup guide for developer

Emil Schoenawa edited this page Nov 8, 2017 · 14 revisions

Prerequisites

  • Install IntelliJ IDEA and activate a free premium account if you are a student
  • Install Android Studio
  • A smartphone with Android 4.4 or higher

Setting Up SharkNet

  • Open IntelliJ and checkout the SharkFW project (NOT SharkNet!)
  • In IntelliJ click View -> Tool Windows -> Maven Projects
  • Within the now opened Maven Projects Explorer, click on the Drop-down list "sharkfw-core", then click on "install" and then on the green arrow. This will install SharkFW to the local maven repository:
  • Open Android Studio and checkout the SharkNet project
  • Open a command prompt and navigate to the in step 4 ceated folder of SharkNet
  • Type and execute the following command: git submodule update --init --recursive --remote
  • Switch back to Android Studio and you should get the message "Unregistered VCS root detected" in the bottom right. Click "Add root" to add the submodule to the version control configuration of Android Studio. This allows you to commit changes to the api submodule.
  • Open a command prompt in the "SharkNet-Api-Android" folder (which is located inside the SharkNet folder) and execute the following command: git checkout master
  • Go back to Android Studio, click on View -> Tool Windows -> Gradle
  • Within the now opened Gradle Explorer, click on the Drop-down list "SharkNet", then click on "Tasks", then click on "install", then double-click on "installDebug":
  • You should now be able to run the project (Run ‘app‘)

Setting up your mobile phone

  • It is advisable to test the SharkNet App with one or multiple mobile phones. Emulators are not quite suitable for SharkNet
  • Go to the run configurations -> General -> switch Target to Open Select Deployment Target Dialog (and later to the option USB Device)
  • Follow these instructions

Inspecting the SQL databases of the app

  • Install the app on two or more devices
  • Enable Bluetooth on all devices
  • Create a new account and search for other chat partners via the „+“ button
  • Send multiple messages to the chat partner
  • Check if the other partner received the messages
  • Connect your mobile phone with a PC
  • Create a .bat file with the content: „adb pull /sdcard/Android/data/net.sharksystem.sharknet/files“
  • Move the .bat to a location where the SQLite databases shall be stored
  • Install SQLite Studio: https://sqlitestudio.pl/index.rvt
  • Execute the .bat
  • Open the new ceated files folder, after that open the chats folder
  • Open the .db file with SQliteStudio, choose the .db file which includes the nicknames of you and your chatpartner, e.g. DustinFMichaelS1503514403815.db
  • You can now inspect your sent and received messages inside the knowledge table