Google App Engine Connected Android (Eclipse) device endpoint error - java

I am just started exploring app engine with android (Java) and I followed a link to teach me how to create an App Engine Connected Android Project. https://developers.google.com/eclipse/docs/endpoints-androidconnected-gae
I followed exactly what was written in the link ,
1) Created a new app engine connected android project
2) Get the project number and API Keys from https://code.google.com/apis/console/#project
3) enable Google Cloud Messaging in the Google APIs Console
4) set the LOCAL_ANDROID_RUN to true in CloudEndpoints class
5) used a emulator with google api(v17)
6) installed the android cloud messaging library from android sdk manager
7) I am using eclipse indigo
i got errors these lines in RegisterActivity.java
import messageEndpoint.MessageEndpoint;
import messageEndpoint.CollectionResponseMessageData;
import messageEndpoint.MessageData;
i got i got errors these lines in GCMIntentService.java
import com.tez.deviceinfoendpoint.Deviceinfoendpoint;
import com.tez.deviceinfoendpoint.Deviceinfoendpoint.Builder;
import com.tez.deviceinfoendpoint.model.DeviceInfo;
and errors like that:
Deviceinfoendpoint cannot be resolved to a type GCMIntentService.java
MessageEndpoint cannot be resolved to a type RegisterActivity.java
What should i do?

Right click on the app engine project and select Google-->Generate Cloud End Point Client Library. Clean the project and refresh. It should work.

Although I'm not quite sure about the cause of your error stack, it's encouraged to right-click on the app-engine project and select generate cloud end point as suggested above. However, if you badly need to create an endpoint on your own, you will have to make sure a similar entry as below is added into your web.xml inside your webapp directory.
<param-name>services</param-name>
<param-value>${package}.MyEndpoint</param-value>
And after you ensure the above entry,
you can make your module
Deploy it local server and run the app on emulator
Or else if you're working with your production server,
Make the module
Deploy to app-engine and test it on a device or an emulator of your choice.
Hope this might help you if the issue was with your new endpoint/services exposed through the new endpoint that you create. Thanks!

Related

Angular8 using capacitor application failed to login from android studio

I am using
angular 8
nativescript 6.8.0
typescript 3.5.3
"#capacitor/android": "2.4.0",
"#capacitor/cli": "^2.4.2",
"#capacitor/core": "^2.4.2",
ng serve -- webapp is working fine login also working fine and able connect backend login REST API
npx cap server -- also working fine on http://localhost:3333/
I follow https://capacitorjs.com/ to convert my webapp to android app but
npx cap open android --- able to open app on android studio but not able to login and also not able to dubug properly because i am not java and android developer expert can any one guide how to proceed and where i am going wrong.
Add this in Your manifest in application tag
cleartextTrafficPermitted="true"

Unable to view <my-project-id>.appspot.com on browser

Trying to understand how Google Cloud App Engine works, I am trying the tutorial mentioned in:
https://medium.com/google-cloud/getting-started-with-google-app-engine-and-spring-boot-in-5-steps-2d0f8165c89
I can get the response "Hello Spring Boot!" on my local system using browser at "http://localhost:8080" but when I deploy the code to Google App Engine, I access .appspot.com then i fail to get the message "Hello Spring Boot!" but get 404 Error not found. I suspect this is an access/permissions issue but have not been able to solve it
Things I have checked:
1) My GCP has billing enabled for this project
2) I can see that there is one instance for in App Engine dashboard
3) My Google application credentials in bash ENV variable points to the API key created for this #appspot.gserivceaccount.com
4) I have used GCP to deploy an earlier project for maven spring boot, this is a new project to test APP engine.

How to implementing server for Google Cloud Messaging to send Push notification android studio

I want to implement push notification feature in existing android app.
I am following https://developers.google.com/cloud-messaging/android/client
tutorial.
As of now so far so good.
Now to send the push notification we must have to implement client and server.
I found the tutorial https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/GcmEndpoints. I followed it but getting lots of dependency errors in android studio.
Can anybody tell me how to implement server side?
Is there any better tutorial for the same?
Am I on the right track?
I refered below question on stackoverfolw but not satisfied...
How to create server for GCM project in Android
Android push service, implementing the gcm server side (A PHP server, I don't have PHP knowledge , so would like to implement in JAVA launguage)
http://myandroidpoint.blogspot.in/2013/03/android-google-cloud-messaging-server.html
In short, My client is ready, stuck at implementing server.
Thanks!
Any help will be highly appreciated.
Let's assume you have created a new project at Google Developers Console and taken note of 2 values: Project Number, which will be used as SENDER_ID in a client project; and API server key (created at Credentials), which will be used as API_KEY in a server project.
You can find more about basic server project with my answers at the following questions. In the second link, you will find sample code for a server project in Java:
Adding Google Cloud Messagin (GCM) for Android - Registration process
How to implement a GCM Hello World for Android using Android Studio
Hope this helps!
I had the same problem.
Respect dependencies : I had two problem and I solved ( google.code:findbugs and annotations)
In the first case I deleted directly the "compile testnespresso" and in the second case I changed the version of appcompat ( i had 24) :
Now it's my build.gradle (app):
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support:support-annotations:23.3.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.android.support:appcompat-v7:23.3.0
'
After I followed the steps in the links you posted and it works perfectly I have a server and I can send messages....( I deployed appengine )

Link to local Google App Engine database

I have created google app engine application and I run it on: 10.0.2.2:8888/
but I forgot what is the full link to get to the full list of recrods uploaded to the app engine.
http://10.0.2.2:8888/WHAT_SUPPOSE_TO_BE_HERE
The App engine was generated automatically by ADT(Eclipse) for Android application.
This is the correct answer which has to be at least 30 characters long:
http://localhost:8888/_ah/admin/

Android + Google App Engine connection

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.

Categories

Resources