Google Mobile Backend Starter: Extending the Mobile Backend - android

In Google's docs on "Extending the Mobile Backend", there is supposed to be an explanation on how to customize the Google App Engine app that is provided with the Mobile Backend Starter. The approach is to modify its sourcecode and deploy that to Google App Engine.
However, the text refers to the sourcecode of the sample Android client, not of the Google App Engine app, which I guess is just wrong. In the README.md of the sample Android client, though, there is an unused footnote pointing to https://github.com/GoogleCloudPlatform/solutions-mobile-backend-starter-java, which seems to be the correct sourcecode.
My questions now are:
Who can I tell that there is a mistake in the docs?
Does https://github.com/GoogleCloudPlatform/solutions-mobile-backend-starter-java really reflect the latest version of the mobile backend that gets deployed when I hit the button as described in the docs on Deploy Backend?
When I modify the backend, I effectively fork the sourcecode. Will future developments be reflected in Github so I can merge them into my modified app?

https://cloud.google.com/cloud/samples/mbs/extend_backend
(SO THERE IS NO WAY.... as the "Extending the Mobile Backend"... "Setup Instructions" tells you to use "Open Android SDK Manager and choose Extras > Google Cloud Messaging for Android Library" -> no longer available.
next is to use: https://cloud.google.com/endpoints/

Related

Integrating Google Cloud Storage in an Android app

I have spent over 2 days reading over the documentation over at Google Cloud Platform to find out how to hook up my Android app to my Google Cloud Storage.
I don't know if it's just the documentation that's just bad or my lack of understanding but I have really not gotten any closer in implementing this. By contrast I remember it took me a couple of hours implementing Amazon S3 support in an earlier Android project so I'm not a complete idiot.
My requirement:
Upload images to my GCS account
Questions:
Is there a simple "Hello World" type of example for hooking up an Android app to GCS?
I don't need access to users data so does that mean that I don't need OAuth 2.0?
Thanks
You need to use app engine and can use cloud end points to build your application. Detail procedure for creating android app and using app engine as back-end are described here and here

how to include client libraries in 2nd android application generated by GAE Backend for the 1st android app

I have successfully developed an android application with Google App Engine as the Backend. Now I want to develop 2nd android application and want to connect it to the same App Engine of the 1st App. In short. 2 android applications with same App Engine at the backend hence common datastore.
Could not find the detailed and satisfactory answer, please provide the answer in detail. Thanks
I am assuming that the first Android application connects to the App Engine backend using a REST APIo r in general a Web Service. That is the recommended route and you should be able to use the same API in your second Android Application too !
Do give more details if this is not what you were looking for.
Surprisingly, the Eclipse plug-in doesn't really support this - it will only automatically copy the generated client files into a single project.
Fortunately, there are some (manual) solutions that are discussed here:
How to move Cloud Endpoints generated sources.jar library into Android project

Creating Photosharing app on Android

I want to develop android application like Photofeed application as mentioned on Google cloud sample link or like Instagram. For that I need App Engine SDK but i am not getting how i will achieve this functionality. In my app, i want exact functionalities (uploading image, like and comment on that photo) like Photofeed app shown on that link. For that I'll have to use Google Cloud Storage but Photofeed is for Webapp and i want to develop Mobile app. For that i also referred Mobile back-end starter but not getting much idea. Its quite confusing. Please guide me to develop this application. Is it possible to use Photofeed sample java classes in my android application?
Thank you.
You will need to install Google Plugin for Eclipse and make Android Connected App Engine Application. This is a good starting point.
You can make similar app or any app that connects to GAE as backend in 4 steps as follows:
Make your entity classes: You can use JPA, JDO or Objectify to access the Data Store or use its API directly as done in the sample NoSQL classes (The easiest way is Objectify IMO). Or you can use Google Cloud SQL as done in the SQL classes of the sample ( I never used that in a project so I do not know if there is another way beside the API).
Make REST Endpoints: You can use Google Cloud Endpoints to make REST API for your own app. This will allow you to develop Android, iOS and JavaScript clients in unified way. If needed you can secure it using OAuth too.
Generate Client Libraries: If you are using Eclipse, Google Plugin will provide that in the context menu of the App Engine project so you simply right click and click Generate Client Libraries. It can be done using command line too.
Consume the endpoints in the Android app: This is done really simple as explained here.
Note : You will need a Servlet to upload photos to Google Cloud Storage. You can make use of the one in the sample.

SalesForce with Android?

I want connect sales Force from my Android Program please suggest which one is correct way to achieve this I am new to sales Force I have some knowledge in Android Application Developement.
Thanks in Advance.
You definitely want to use the REST API for mobile apps. The SOAP API is really heavy, and is better for Server-to-Server integrations. The best way to get started building an Android app for Salesforce.com is to take a look at the Salesforce Mobile SDK for Android:
http://wiki.developerforce.com/page/Mobile_SDK
There's a very helpful getting started PDF linked on that page.
However, the SDK is meant mostly for starting new apps, so you'll have some work ahead of you integrating it into an existing application. The main things you want are the oAuth 2.0 User-Agent login and REST wrappers.
You may also find this app useful -- I put it together for a presentation at Dreamforce '11, which was shortly before the Mobile SDK for Android came out, so I wrote the oAuth and REST stuff myself. Might be a simpler starting point for you.
https://github.com/tomgersic/DreamforcengerHunt
Hope that helps!
You can either use the RESTful interface or the SOAP webservices. The latter is a bit easier to deal with IMHO.
Under setup in salesforce, download the partner or enterprise WSDL (partner = generic, enterprise = specific for your SF-instance). Now with wsdl2java you can create Stubs for those wsdl entries. Import those into your android app and use them. See here for a Java Exampe by Salesforce.com.
Be sure your user has the permission to "do API". You might want to look into SSO if you want to make a "production"/commercial app. Also, to login, remember to use the correct password, you might need to add the API key (generate using the Setup tab in SF). Hope this helps.
Try checking out some of the open-source SDK projects the developer evangelists have added to the forcedotcom github
Lots of good examples on different platforms, including android with phonegap/html5 and a native SDK for android (iOS and Android) to get you past authentication and onto building your app.
Salesforce Provides mobile SDK for development on mobile device, here is the link for android SDK:
http://wiki.developerforce.com/page/Getting_Started_with_the_Mobile_SDK_for_Android
You need to:
Download SDK.
Add a sample project included in SDK's native/SampleApps folder(make sure you check include to the workspace while importing the project).
Get your remote access form salesforce and update in your app.
--This should get you started with a sample app form salsforce.
After this you need to modify existing code to your own code.
You can go to trailhead and start browsing on it, while working with your own application you will have to learn a lot about smartStore and smartSync,
I did implemented A smartStore App with using salesforce as database provider, if you want i can upload it to drive and share a link to you and
if you have any doubts about using or understanding the flow be free to ask..

Looking to build a Android App, which syncs to App Engine datastore (python)

I am looking into building an android app, which holds some simple data (probably stored in sqlite). I also have a app engine app which I intend to be an online data store for the information (the app engine app is wrote in python).
The question here is, what is the best way to authenticate a user with the app and how to get the data from the android app to the Google data store?
Thanks
Mike
You could use Google Account authentication and follow this useful post about Authenticating against App Engine from an Android app
You can also give a look at the SampleSyncAdapter sample from the SDK
If you want to authenticate using OAuth, you can do that. The only trick is that you need to launch the flow in an internal WebView, because App Engine's OAuth implementation doesn't allow custom protocols in the redirect. I recommend the Signpost library. If you'd like an example, the 2cloud Android client is licensed under the MIT license (full disclosure, I'm the lead dev for 2cloud). The benefit of this is it allows you to support Android 1.5 and higher. The Accounts API is only supported starting in 2.1.
Another option is the Accounts API. #systempuntoout has good links for that, so I won't reinvent the wheel here.
Finally, it might be worth taking a look at the App Engine-powered Android Eclipse project that was demo'd at I/O this year. It makes keeping code in sync and shared between the two simple. Only downsides are it requires Android 2.2 or higher, and it requires you to write in Java on the App Engine side and GWT for the client side.

Categories

Resources