The simplest way to use C2DM? - android

It has been a couple of weeks and I am having so much trouble making C2DM work. I've read a million guides and watched video tutorials but have had no luck. I just need a way to communicate with my server and my phone in the simplest way. Any help?

If you're still interested in trying C2DM, try installing the Google Plugin for Eclipse and use it to generate the Android / App Engine sample project. It should be able to generate a skeleton project that is able to communicate between AppEngine and a basic Android application. You could verify that the sample works and use it as a basis to debug your custom application.
There was also a related AppEngine + Android session at Google I/O this year.

The easiest way to get push into your app is to use a third party push provider like Urban Airship or Xtify. Instead of writing the code to interface with google directly you integrate the third party SDK into your app and they handle the messy stuff.
Additionally, you don't have to worry about scaling if your app gets (or already is) big. And going cross-platform (iOS, Blackberry) is that much easier.

Related

How do I connect a webapp and an android app with firebase?

I have been trying to learn how to create an app that allows people to upload images via the web or android.
I know that Android uses content providers to implement a mechanism for the sharing of data between applications. More specifically, Android uses the MediaStore API to make use of this functionality. However, that is limited to other Android devices.
I was wondering how I would go about connecting a web app made using reactjs to an Android app preferably using firebase. However, if it isn't possible in firebase that would be okay too,
I am a beginner in web app development, so I am not particularly sure about how the software's architecture will look like.
I have been struggling to find an updated concise solution online. Can anyone point me in the right direction and if not point me to some resources that will guide me in the right direction.
Thank you!
Attach/configure both of your application to use same database and storage bucket in firebase
As you can see I connected my android application as well as web administration application to same firebase project.
As you can see there is an add app option in firebase console where you can select platform. Register both of your application on same project and thats it.

Architecture for cross platform messaging app

i am looking to build a mobile messaging app firstly in android and then ios later, and am struggling with the backend architecture and need some advice on what would be best in my circumstance. Basically i am used to just developing apps through a basic web server and using mysql with php, but now i think and want to create something that not only is very reliable and fast but is also scalable and can be used by both the android and ios platforms.
I am thinking about developing it on google cloud platform using either their google app engine or google compute engine depending on what other architectures i use. Also i was going to use google cloud messaging as my main way of handling the messages, however i am now not sure of that as it is only supported by apps that run on android and not ios, also i have heard it can be unreliable in some messages getting lost.
My main problem is that i have heard so many things about different architectures like ejabberd, xmpp, socket i.o and databases like redis that all work well with messaging apps, however i am not sure which to go that will work well together.
Sorry if this seems a bit of a confused situation, but i dont want to start developing something that i am later going to have to change. Thanks for the help
Announced last week: Engage your users across Android, iOS and Chrome via Google Cloud Messaging 3.0:
https://developers.google.com/cloud-messaging/
https://www.youtube.com/watch?v=gJatfdattno
You are asking about many different things.
Storage: can be a mysql database or something like mongo db
Transport protocol: XMPP is a chat protocol with many chat features included but it is not supported in browsers. WebSocket is more low level and more general but works inside the browser
webserver software: you basically need access to the database and be able to transmit XMPP or WebSocket. I'd recommend node.js for this. PHP is more for web pages

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

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..

Client Server approach for Android application

I currently have a working implementation using GAE and servlets to communicate with my android application. The app will create json objects and send/receive them using the httpclient. I then was looking at the 2.4 beta plugin for using C2DM and noticed that they use GWT along with a RequestFactory for communication. I was wondering if this approach is worth the time switching? Is it easy to setup and configure? Seems like this would be a nice approach if i want to say develop a mobile site along with the app?
If you use C2DM you will need your users to use a google account. I personally don't feel 100% confortable with that.
The best thing about C2DM is that you avoid polling your GAE server. If you have an already working solution, why would you change it?
I would recommend android - appengine combination. However if you want your app to be on non google-play device, you need to think around C2DM/LVL or google wallet API(a mandatory on google play). RequestFactory is great but it is tightly coupled, imho. I would recommend Rest which is platform agnostic, very loosely coupled, thus support GWT, android, iOS, BlackBerry, WebOS, desktop ...

Categories

Resources