0

I have a release version of an app and want to change a URL of a server (REST API), so that a tester could switch between production and test API. I also want to see token and Firebase push-token for this device and account. Also want to show logs after restarting of the app, because it can crash (if possible).

image

I can create an activity with these parameters. It can be opened after tapping several times on one TextView, for instance. It is not bad, but a user theoretically can reproduce and open the activity himself.

I can write a URL in Firebase Remote Config. Because the tester also has access to FRC, he can change the URL there and restart the app with new URL. It's a bit more difficult than changing in the activity.

I can create an activity only in test release version, so that in production release version it cannot be launched (this activity won't exist in AndroidManifest in production release).

What variant to prefer?

CoolMind
  • 26,736
  • 15
  • 188
  • 224
  • 1
    Well, IMO the last variant is best. However - can the Firebase token be switched in the runtime? In retrofit you can easily switch between clients, but can you switch between Firebase release/test tokens? Maybe you will have to register two tokens at once (if possible) and then lock/unlock test depend of the state of the app – Mariusz Brona Jun 22 '20 at 13:23
  • @MariuszBrona, thank you! Agree. Firebase push tokens are long-living (usually until reinstall the app / wipe data). – CoolMind Jun 22 '20 at 13:24
  • 1
    I think you can use https://stackoverflow.com/questions/22024537/using-non-production-activity-for-testing-with-android-studio – Shalu T D Jun 22 '20 at 13:28
  • @ShaluTD, thank you for searching! I didn't see it. – CoolMind Jun 22 '20 at 13:43
  • @ShaluTD, you are right, currently I am working on it. – CoolMind Jul 09 '20 at 13:58

0 Answers0