I'm working on connecting an android app in Java with google app engine. This is my first time doing it. I watched and did the same thing that it was done in this video:
http://www.youtube.com/watch?v=M7SxNNC429U
I have been working and I'm getting the same problem. When creating the project and running it, it runs but it shows me a message that I have to create/add an account, I already register it when creating the project. When I enter my gmail account info it shows me a message saying: "Can not connect with the server". I'm not sure what it is happening, please a ed help on it, thanks for you time and patience.
Careful C2DM is deprecated in favor of Google Cloud Messaging and the latest Google plugin doesn't have the wizard for creating a App engine connected android project
That video is awesome, but there's some useful documentation for AppEngine Connected Android apps too. Specifically in the Creating A New Project section, it explicitly states,
Important: You must sign up for a C2DM account using the same Google account that you use for the Android application you are developing and for the GPE plugin.
You can go back and edit things later so that the account you're logging into the app with is separate from the role account being used for C2DM. But for the code generated by the plugin, they have to be the same account. Also, don't forget you actually have to sign up for C2DM, as it isn't enabled in all accounts by default.
Related
I am getting the following error when attempting to connect to Google Play Services:
-- E/Volley﹕ [131] BasicNetwork.performRequest: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/me?language=en_US
-- E/SignInIntentService﹕ Access Not Configured. Google Play Game Services API has not been used in project 608941808256 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/games/overview?project=608941808256 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
com.google.android.gms.games.server.error.GamesException
I have configured my application on Google Play Developer Console and it's ready for testing. I have linked an app to it and enabled appropriate APIs in the Developer Console (Google+ Api, Google Play Services Api, Goole Play Android Developer Api ..).
I used the SHA1 keys that the apk uses, which I added to the OAuth 2.0 list in the Developer Console.
I am using sample code provided by Google, have added my app_id in the ids.xml file (1058015326796), which does not match the project ID in the error message.
How do I connect to Google Play Services properly? Have I forgot some step in setting up the access? Why is the project ID in the error message different from the ID I am using in the application?
608941808256 is a telling project ID - it means that for some reason Google Play services didn't map your app to your client ID. This look up is generally performed by SHA1 and package name.
You mention you added your SHA1 to the developer console, which is good - maybe then check that the package name is correct. For example, maybe you append ".dev" to the package name for development builds or similar, or the package name in your build.gradle is different than the one in the Developer Console.
Remember to look under OAuth 2.0 client IDs as well - that's the section that needs to have matching values.
I spend 4 days with the same problem.
I had created project in Google Play Developer Console with all needed API's
Like you I used the SHA1 keys that the apk uses, which I added to the OAuth 2.0 list in the Developer Console.
And the solution in my case was :
to generate signed APK.
I was sending GET request for Account Data with app that was just build and run.
After 4 days of trying i read
Before you can publish an app that retrieves an OAuth 2.0 token for Google REST APIs, you must register your Android app with the Google Cloud Console by providing your app's package name and the SHA1 fingerprint of the keystore with which you sign your release APK.
and thought I will generate signed APK, and it worked.
Ps. I doesn't use Volley so i don't know if this will help you.
I got the same error.
[Problem 1] Wrong app_id, achievement/leaderboard IDs in the ids.xml!
[Solution 1] Replace or set the ids from google play game console.
[Problem 2] Use debug key and release key by mistake
[Solution 2] Be careful using the key(SHA1), pay attention whether it is debug or release.
I have created an app and a service (service for Leaderboard), everything works fine with leaderboard when i am signed in with my tester google account. When i change to another account it show me:
RESULT_LICENSE_FAILED Error=3 Code=10003
p.s.1 My service is fully published
p.s.2 My updated app (implementing Google Play Services -Leadeboard) is not published at Play Store.
Do you think that if i publish my updated app will be working fine, or i have to check something else?
Enabling anti piracy in the linked application when you setup your game could cause this, see https://developers.google.com/games/services/android/antipiracy
This can cause that error when not downloading the app from the play store.
I need to add news part to my android application.
For example some application shows a notification that says the new version is available or our new product has been released. Some application shows this once and some of the shows each time the Internet is available.
Is there a class for server and client side of this parts?
thank you for your help
While working with Google Playstore, you can achieve this by updating your app version in the manifest file before publishing the updated apk build. Google Playstore will show timely alerts to the user saying "App needs to be updated", redirecting them to the Google Playstore link.
android:versionName="2.0"
Also you can call one of your webservice, within the application which checks the existing app version and latest app version. If the app needs to be updated it redirects to the same Google Playstore link.
I am trying to Implement GCM for my application but emulator gives above message.
I have updated my Google API
I also include Google play service library project
I also add Google play service library
I also recreate my Emulator
Still my project wont run
this is my emulator details
when i try GCM with old GCMRegistrar library which is currently deprecated, is working with Emulator but when i Used new GCM google play services for GCM it shows above error message
Include gcm.jar andgcm-src.jar file from your sdk location\sdk\extras\google\gcm\gcm-client\dist to your project library. Also dont forget create an emulator with GOOGLE API and add your google account in your emulator(emulator created with google api) settings-> account & sync settings -> add account -> google account -> now enter a valid google id and password.
Also you must have internet connection in your system, because these message is comming from google cloud message
I am using Google+ in my app. And I can share content using following code
Intent shareIntent = new PlusShare.Builder(ViewGooglePlus.this)
.setText("Android Testing for Google+")
.setType("text/plain")
.setContentUrl(
Uri.parse("http://androidsolution4u.blogspot.in/"))
.getIntent()
.setPackage("com.google.android.apps.plus");
startActivityForResult(shareIntent, 0);
but it works only when official Google+ client is installed on device.
I want to share content whether official Google+ client is installed in device or not.
I found here that it is possible using this library but don't know how to use it ?
Is it possible? Anybody have an idea? If yes, how can it be done?
You cant share to Google+ if the application is not installed in the device. You can use Google App Engine and Google+ APIs to share the content.
https://code.google.com/p/google-api-java-client/wiki/APIs#Google+_API
One such example can be found here on Git.
https://github.com/imellon/Google-Plus-Android-Sample
I think you should go for OAuth Authentication of Google Plus. This will provide explicit Authentication then Intent based.
In this mechanism, you are creating one WebView and open link of Google login page. When user is login successful, google return an Token, which you can use in your application to work with its different application like Maps, Location, Google+ etc.
Here is link which have demo application.
You need to register yourself with Google Console and put two important information clientId and clientSecrets.
GOOGLE_PLUS("client id","client secret","https://accounts.google.com/o/oauth2/token","https://accounts.google.com/o/oauth2/auth",BearerToken.authorizationHeaderAccessMethod(),PlusScopes.PLUS_ME,"http://localhost","plus","https://www.googleapis.com/plus/v1/people/me/activities/public")