1

We have two app engine instances running the same code for the sake of testing and production server. We are using endpoints API. Our android app which connects with both servers uses the same client code generated by google app engine tools. Based on our need we just switch the server url using builder.setRootUrl(someUrl);

on our test project we have set the package name and sha1 key to generate the android client id but we are unable to do so on production server because of the same package name. It gives an error by saying that package name should be unique. Now the problem is how do we maintain the code to connect the app engine. Worst case would be to have two different projects with different package name.

any other solution ?

pankajanand18
  • 393
  • 2
  • 12

2 Answers2

0

Android client id is bound to the tuple of (package_name, sha1_key_hash). Do you use the same sha1 key? if so can you try use a different keystore? (you can generate one from android studio->Build->Generate Signed APK->Create New). Or can you reuse the same client id?

Min Wan
  • 556
  • 5
  • 3
  • Min, This will get us two applications with same name and we won't be able have both applications installed same time. This defeats the purpose of having same code base working for 2 different app engine projects. – pankajanand18 Apr 27 '14 at 09:38
0

Currently we have fixed it by passing 2 android api keys ( key for production server and test server) to our endpoint api service.

pankajanand18
  • 393
  • 2
  • 12