-
Notifications
You must be signed in to change notification settings - Fork 33
Using the Android Emulator
To connect to the CoopCycle server running on your machine, use the special address 10.0.2.2
Also note that the address 127.0.0.1 on your development machine corresponds to the emulator's own loopback interface. If you want to access services running on your development machine loopback interface (a.k.a. 127.0.0.1 on your machine), you should use the special address 10.0.2.2 instead.
Set Up Android Emulator Networking
When the emulator is running, in Android Studio go to Tools > Android > Android Device Monitor.
In the Emulator Controls tab, you can set the location manually, or load GPX file to simulate location changes.
You can test remote push notifications on the Android emulator.
When creating an AVD, at the step Select a system image, choose x86 Images, and make sure to choose an image where the Target column says Android XXX (Google APIs)
The app has been successfully tested with Oreo - API Level 26 - Android 8.0
- Setup a Firebase account to download google-services.json
- Copy
google-services.json
to theandroid/app
folder
To test it on a local CoopCycle instance running in Docker, you will also need to configure FCM