I have strange problem with generating process. After click on Generate Cloud Endpoint Client Library everything works right, but if I look in the endpoint-libs/ folder I saw that former folder structure was changed.
First part of it is still ok endpoint-libs/libmyname-v1/myname/myname-v1-generated-source/
but next one is com/google/api/services/my.package.name/myname/ and com/google/api/services/my.package.name/myname/model/.
Despite it every single .java file of generated libraries has in my opinion wrong package:
package com.google.api.services.my.package.name.myname.model;
If anyone encountered this problem and solved it?
This is a known issue. You can see the workaround here, or follow this bug entry for status of a fix.
Google just posted GPE 3.2.3 and a server side fix which appears to correct the issue; however, existing code is not necessarily backward compatible. As an example, changes are required in the standard Google generated GCMIntentService:
Migrated to usage of the new com.google.api.services path, as:
import com.google.api.services.deviceinfoendpoint.Deviceinfoendpoint;
import com.google.api.services.deviceinfoendpoint.Deviceinfoendpoint.Builder;
import com.google.api.services.deviceinfoendpoint.model.DeviceInfo;
Modified the call to insert methods from:
endpoint.insertDeviceInfo(new com.google.api.services.deviceinfoendpoint.model.DeviceInfo().setDeviceRegistrationID(registration)).execute();
to:
endpoint.deviceInfoEndpoint().insertDeviceInfo(new com.google.api.services.deviceinfoendpoint.model.DeviceInfo().setDeviceRegistrationID(registration)).execute();
I have been unable to find the official documentation on why this breakage was required and rationale.
Related
I attempted to follow and old tutorial for Sending E-mail with Amazon SES Using the AWS SDK for Android here:
https://developer.amazon.com/post/TxEUZC89WLEC2Z/Sending-E-mail-with-Amazon-SES-Using-the-AWS-SDK-for-Android.html
I am having a little trouble however. PropertyLoader cannot be resolved. What jar library is this a part of? I have tried importing all of the jar libraries from the SDK into my Eclipse project. (http://aws.amazon.com/mobile/sdk/).
I also get an error on this line: SendEmailResult result = clientManager.ses().sendEmail(request); I am guessing there is another class called ClientManager to set this up with in which I am also not able to find.
Any thoughts or links would be helpful. Thanks.
From the tutorial it looks like it follows a sample. Doing a quick Google search finds me this page.
I imagine the clientManager stuff is also there.
Note that the post is very old so I'm not even sure it still works with the current version of the SDK
I've been searching for a couple of days, including on this website. What I have found would be useful, however I find that I'm unable to follow them correctly. The questions here have no answers either.
Firstly, when I attempt to add BasegameUtils to the project and import whats needed, Eclipse cannot find them. I don't understand why, because I have imported it and marked it as a library.
This is not helped by the fact that all of the examples have their mainactivity in the folder where the API is. I have already built a full application, and I do not understand where I'm supposed to put mine.
The whole thing is incredibly confusing, and any help, or examples would be lovely.
https://developers.google.com/games/services/android/init
You need to implement baseGameUtils as a library or module depending on your IDE.
public class Main extends BaseGameActivity
And then you call this to unlock the achievement.
Games.Achievements.unlock(getApiClient(), getString(YOUR_ACHIEVEMENT_CODE));
These code samples really helped me first time round.
https://github.com/playgameservices/android-basic-samples/tree/master/BasicSamples/libraries/BaseGameUtils
The tricky part isn't the code, it's the configuration of your project, make sure to check on the play developer console that you have set up your testing account properly and your achievement codes are correct etc.
Okay, the solution was not simple. The guides seem to favour Android Studio, which implement a script to create BaseGameUtils. The BaseGameUtild that I was importing with Eclipse was not the correct one. I ended up searching for a valid one, and downloaded it.
The second thing I was doing wrong was not updating the SDK to version 20. Now, with the Play Services Lib in the extras, I could import the updated version.
After that, I discovered that gms.; actually must be written as com.google.android.gms..;. With this in line, I am now able to properly implement everything.
Thank you to those who helped.
I am attempting to implement push notifications in an Android application, and I found plenty of examples, but they all import com.google.android.gcm - a package that has since been deprecated with (supposedly) its features folded into the GooglePlayServices package (I have version 15). I've tried to hook up that as well, and it does not work with the example code, and seems to require the deprecated package.
Does anyone have any up to date examples?
Any help would be greatly appreciated in figuring this out!
I wonder why you are looking for other example while google have provided you complete working code example including both server and client. What do you need is just to check out source code from here. Import project named "gcm-client" into work space. Add "google-play-services_lib" project from android sdk folder as a library. Change your SENDER_ID in DemoActivity located in com.google.android.gcm.demo.app package. That's it.
Please ignore samples/gcm-demo-client in same downloaded code directory. It uses old deprecated classes. You may reuse its utility class ServerUtilities to send/delete registration id to/from your server. [Thanks NickT for identifying ]
Edit:
Deprecated code is still exist as gcm-client-deprecated on given repository. Just ignore it and use gcm-client.
I am having some problem. When I run an console application in eclipse (non-android) I imported google-api-client-googleapis-1.4-beta.jar google-http-client-1.8.3-beta.jar
It work!!
but when I import the same thing into my android application, it fail at new com.google.api.client.http.apache.ApacheHttpTransport(); [ClassNotDef Exception]
Then I follow a lot of the post suggesting a list of library, download all of them, and import all of them.... but it still doesn't should The way I import is right click on the project->config build path -> library -> add external jar file..
So once it switch to android application, it can't find the class. I thought I import the class properly, but since I am having the classNotDef I don't think I am. Anyone knows the reason why????
Any Hints will be good.
Or maybe suggest a list of libraries require for project.
Thanks a ton.
Lawrence
The class you are looking for does not exist in Android's package structure. There are two solutions to this problem:
1: You can check out the corresponding package's documentation and use a different class.
2: On the other hand you can take the class you want and package it with your application. Then it is guaranteed that it will be found.
I downloaded the Android in-app billing example and imported it into Eclipse. After import I see some strange errors.
There is a source file AccelerometerPlay and the string resources in the Dungeons.java file are not existing.
It seems that the download got the wrong resources. Has anybody seen this and knows how to get the right code?
Of course I can put in my own strings to get rid of the error markers, but I cannot say if something else is missing. So I'd rather have a correct version of the code.
How can I take over this question? It is not resolved for me and I can not up-vote it or comment on it stating this still persists for me. Duplicating the question can't be the solution neither.
More details:
The Dungeons example is not in "Extras/Google Market Billing Package" as shown in the screenshot in their tutorial but in "Extras/Google Play Billing Library"
The version of this is "revision 2".
After removing it via the Android SDK Manager various times and adding it again to re-create the project from source within Eclipse, I now did check the "create Activity .Dungeon" checkbox in the last step and think that did the trick. I'm not eager to verify this assumption ending up without a broken project again though.
In Eclipse and Intellij, if you create a new app over those existing sources (and presumably have it create a default activty like "MyActivity") it will overwrite some of the billing files namely the main layout and the strings file.