calendar push notification to java app engine backend servlet - java

I want to get push notification from google calendar into my java app engine backend servlet. My question is, do I need to verify my java app engine backend servlet (which is hosted on google app engine server)?
Thanks.

Yes, you need to verify the domain even if it is hosted by Google App Engine. Remember to always use HTTPS otherwise you won't be able to do it. To verify the easiest way is to create a static HTML file that points to the same file name in the root of the application.

Apparently it can't and I tried using HTML file and meta tag method without any luck to verify my app engine backend site.

Related

How to access SQL database with Web App and Android App

What is the best way to have a SQL database that can both be accessed by an android device via java code and by a web app via php code?
In my mind I imagined a MySQL database somewhere on the cloud that is accessed in all the normal ways by the web app using mysqli_connect and then somehow the same database calls are made in Java inside the android app.
But after some research it appears this may not be the way to do it. What is the way to do this correctly?
EDIT: It was suggested my question was too broad. What I want then is a database of some basic financial information which is stored on the cloud which is then able to be accessed via a web app written in the LAMP stack and via an android app (with java code).
It is a really simple problem but I am not sure what the best practice for such a problem is in android (I come from a web dev background)
The standard way to access a database for mobile application is different than a normal web page/application.
Mobile devices should never run queries in the database; What you do is create a web service that does all the queries in the database and then sends back HTTP responses in xml, JSON format to the mobile device for consumption.
At the same time you can create a web client that interacts with the web service the same way your mobile app does. This way if you get erroneous data you can debug the web service without having to recompile the code in the mobile app.
Do a Google search for restful web service

google app engine java backend _ah/start

I read in the google app engine backend documentation for java and it's said that we need to give the url for the backend to be _ah/start. Is the java backend url-pattern in web.xml needs to be _ah/start? Can I change that into my custom url name?
Thanks.
From the App Engine documentation:
A backend instance can be targeted with HTTP requests to
http://[instance]-dot-[backend_name]-dot-[your_app_id].appspot.com,
or at your application's custom domain.
So you can use whatever domain is configured for your app. _ah/start is a way to start the backend, i.e. a simple request sent to:
backend1-dot-myapp.appspot.com/_ah/start
will start the backend. You don't have to do it - you can send any request to a backend, and the App Engine will start it for you if no instances are running.

application email service, send identical emails from public api and website

in a student project we are currently developing a website which service is also accessibly via native Android and Windows Phone Apps.
The mobile apps access the service through a public RESTful API written in JAVA which is running on the same server as the website. The website is written in PHP and independent from the API, but they both use the same database (MySQL).
We wanted to extend the functionality of the API and allow registration for the service in the mobile apps.
The problem is that the user receives an email with a confirmation link as soon as he registers for the service.
What is the best approach to ensure that the emails sent by the API are identical to the ones sent by the website?
The easiest way we figured out doing this would be just using the same templates for both, website and API, but in that case we need to manually keep those templates in sync.
Is there a better way than the one above?
Templates need not be in flat file model in each environment. You can store it at one place but should be read by a common intra-web-api say local RPC.
I.e. Write a script in current website environment that returns either a template or duly filled in as the requirement case may be.
And the same API should be called from both web-site php scripts and from java API.
This process will not alter the output in both the environments. The output would always be the same when on a later date you change the template.

where are the Google app engine endpoints

Im developing a simple app for android. I just created a few entity's, nothing but a poem filled in them by a string. Ive been using Google app engine and it works in my browser just fine, deployed my little project. I want to use retrofit lib to grab the list of entity's i made in probably a simple for loop to an object class i make for them, however how do I define my endpoints! I cant seem to find them. new at this networking stuff but i'm trying very hard.
https://developers.google.com/eclipse/docs/endpoints-androidconnected-gae
Looks like I need to actually create an app linked to the Google a engine.
Is this the only way? What if i had a team who needed to access the end points on an iphone app/
If you are having an android app which was not created using appengine connected app option, then you can still create the app engine code for it by right clicking and choosing the options Google->Generate App Engine Backend . After modifying your backend code, you can generate the client library for this backend by right clicking and choosing option Google->Generate Cloud Endpoint Client Library ,then deploy it to app engine and start accessing the endpoints from the android app.
If you are already having an android app and app engine code which are not yet connected, then you need to modify your backend code to include endpoint methods by following this tictactoe sample backend with endpoints . After doing this, you need to generate the android client lib using command line and import it to your android app to start accessing the endpoints. Follow this tictactoe sample android app to understand how to call endpoints and get and send data to the same.
In the future if you want to access the same endpoints from an iOS app, you wont need any modification in your backend with cloud endpoints and just need to create a client lib for iOS by following the official documentation. You can see the sample tictactoe app for iOS to understand how to handle endpoints in iOS

BlackBerry OAuth Alternative

I am starting to think that there are no OAuth libraries that I can use with BlackBerry mobile devices. The only possibility I have found is the following, which I have yet to look into with detail:
http://github.com/fireeagle/j2me-oauth
So, my question is (assuming there are no other libraries), what is a work around for this? Would it be possible to have my application use an embedded browser, and do the authentication via javascript or php or something like that, and then find a way to pass the authenticated token to my application? I want my app to be a native Java application on the BlackBerry, I don't want it to turn into a complete web application that just displays in an embedded browser. Any thoughts?
Maybe you want to look into
signpost and signpost old site
Or this one
http://bazaar.launchpad.net/~brightkitemobile-dev/brightkitemobile/trunk/files/head%3A/trunk/src/com/orangatame/mobile/oauth/

Categories