Integrating Google Cloud Messaging into Android App - GCM Connection Server - android

I'm learning android app development, and undertaking a project for educational purposes.
I'm building an app that is like a memory scrapbook - the user can curate scrapbook pages with images imported from their image library, and add written text. There is no server, and the data is stored in XML files.
I've now been tasked with adding a new feature - the ability for users of the app to send each other text based messages to add to a scrapbook page.
I've looked into the Google Cloud Messaging service, and integrating it with my app. I've read that this would involve setting up an application server, to send data via a HTTP or XMPP protocol.
I feel just about proficient enough in java to do the project with the guidance of tutorials, but have no knowledge or experience of servers, or communication protocols.
Can somebody guide me on what is involved in setting up an application server? Or point me in the direction of a tutorial where I can learn more.
Would it involve modifying the way my app currently stores data?
Are there any inherent issues with security that would need to be considered?
And this is highly speculative, but is it feasible for a beginner to undertake in 4 weeks?

Try to look at the new Firebase service from Google. It is the replacement of the old GCM.
What is firebase:
https://firebase.google.com/features/
Android quickstart guide:
https://www.firebase.com/docs/android/quickstart.html

Related

Online Storage Android App

I am to build an android app that needs a central cloud storage (along with some server coding). My app is somewhat in the footsteps of
https://play.google.com/store/apps/details?id=com.justyo
I mean i should be able to store a login and registration (possibly FB login in the future too). Then, i will also have to maintain and fetch users' 'friends' in the app along with a status (that can be changed any time by the friends).
I am not new with android dev. I also know ample amount of web development. However, i don't know the approach to this kind of an app that is to use some server side code and online db for android.
I have search a lot on the internet and have found a bunch of stuff, but i am just not getting the confidence as to which approach is what i need here.
Is there something pre-built and given by Google themselves?
Do i have to by a domain, deploy a hidden (UI-less) web service and access it through the android app?
is there a free option out there by google?
Is there a sample demonstration android app out there?
I don't need the code or anything. I am just confused; afraid of starting off in the wrong direction. Please answer so it is easy to understand.
Thank you in advance :)
There is the Google Cloud Platform, specifically App Engine. You can read the Docs here.
You dont't need to register a domain to use the platform. Yes, you will need to deploy a (not necessary UI-less) web service to the cloud, accessed from the Android client through endpoints. Additionally, the service is free up to certain limits.
Sample apps are available for deployment once you create a project from here.

Which MBaaS platform to use for a specific project: Parse or Google Cloud

My Android project currently requires an authentication of some sort (mobile phone number / facebook / gmail... I haven't decided yet), frequent read/write operations from the server's db (not a big amount of data, and no images/videos), push notifications and in the future, possibly complex queries on the data stored.
I started reading about Parse and Google cloud (in google, specifically about mobile backend starter).
I can't seem to find a comparison between the two. I've read that both have relatively easy implementations, but except for the platforms (I'm using Android, so both work for me), I can't find a place that says "Parse is better at ... and Google cloud is better at ...".
So my questions are:
Can anyone please give a recommendation / reference?
Does one of the above platforms at all fit my project? (I am familiar with AWS, and would like to avoid it so I will not need to worry about stability and scalability)
Shameless plug: I'm a developer at kii.com
You can also take a look at Kii Cloud MbaaS
Among its features:
User management, including authentication using Facebook credentials.
Data management that never locks you into any schemas.
File storage and cloud backup for your app.
Push notifications so you can push messages to your users or to your
app itself with updated instructions for functionality.
Geolocation so you can offer location-based services.
Server extension to define your own business logic without managing
servers.
Android, iOS, html5 and unity support

How do I make requests from an Android app to an App Engine backend?

What I'm trying to do is have an Android app that connects to a Google App Engine backend in order to get data from a database stored in the cloud. I've looked up some documentation and figured that Google Cloud Messaging is the best way for this. I'm stuck on trying to integrate Google App Engine with the Android app.
GCM is great for sending small messages from GAE to the app, and particularly for waking the app and getting a message to it even if it isn't running.
Sending a request from Android to GAE via GCM is new and is not the normal way of making requests. In my personal experience with new Google stuff, I would suggest you stay far away and stick to the normal way which is to do an HTTP/REST/JSON request from an Android to a servlet on GAE.
There many Android libraries for doing this including Volley from Google (this was in use long before it was release so is not as scary as the GCM thing I was mentioning). On the server you could do it with Google Endpoints for easier authentication and cross-platform support, but it too is quite wonky (it is not fully released), so if you don't need those two features I would avoid it.

Integrate Appcelerator Cloud Services to a custom website made with ASP.NET

I'm really new to mobile world, so I'd like to get some opinion from experienced people.
After several days searching over the internet, I'm wondering if it's possible
integrate Appcelerator Cloud Services to a custom website made with ASP.NET, for example.
Although my mobile application, built with Titanium, it's linked to ACS, and works fine, I don't know if
it's possible to manage data stored in ACS from a custom website. To clarify, in one point there is my mobile application
talks to a webserver (ACS, for example) and other point there is a website, to manage the data stored in ACS.
What do you think, someone achieved this?
Or is it preferable to write a webserver from the scratch, store my data in somewhere, and forget about ACS?
Thank you.
Appcelerator says
Appcelerator Cloud Services (ACS) is a Mobile Backend as a Service
(MBaaS), offering a fast and easy way to build connected mobile apps.
Choose from a library of services such as push notification, status
updates, photo storage, and social integration, or create your own
custom cloud services.
Here in this page - Getting Started: Using the Javascript SDK - you can see how we can use javascript SDK which lets you access the Appcelerator Cloud Services server through some simple to use JavaScript calls. You can use this to develop web-based app.
ACS has a REST API which you can access through anything that supports xhr (which .NET does). For instance, to create a new user in ACS, you use the following link:
https://api.cloud.appcelerator.com/v1/users/create.json?key=YOUR APP APP KEY?email=john.smith#company.com&role=teacher
There are other properties you can tag onto the querystring to create a new user from a REST call. They have a complete API using REST. It's all documented. You can even send push notifications to devices from your custom website using the REST API! It's pretty cool.
http://cloud.appcelerator.com/docs/api/v1/users/create#rest
Good luck!

How to make a chat application in android? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I would like to add chat functionality with online user in gmail in android. how to add chat feature in my own application in android?
I want to show an online user in google maps which is nearest to the area which I have selected and have the ability to chat with that online user
To add chat to an Android application there are a number of options. I'll present the options ordered by the amount of development expertise that's required - from least to most.
Using a real-time backend service
There are a number of companies offering real-time backend services. These services would provide you with an SDK which allows your app to access their servers. Using the SDK you would be able to stream data between devices.
Here is a list of the most popular services:
Firebase
Google owned real-time database which uses WebSockets and MongoDB as it's core technology stack. The service allows you to save data in a no-SQL database and then register to receive real-time updates when that data changes. They also offer services for push notification and file storage. There is also a third party open source messaging framework available for iOS and Android.
Firebase have a library called GeoFire which allows you to make your apps location aware.
Pusher / PubNub
I've grouped these together because they are quite similar. They provide real-time streaming infrastructure and technology. You can establish channels between groups of devices and stream data between them. They don't provide any means to authenticate users so you would need an app server.
Quickblox
Quickblox is targeted specifically at the instant messaging market and they use an XMPP server on the backend. Since they use XMPP, this service has a lot of messaging features built in like privacy lists and typing indicators. They provide a reasonable but basic example messaging app.
Layer
Layer is half way between Quickblox and PubNub / Pusher. They offer a streaming platform which is targeted towards instant messaging. They have some messaging features like basic blocking but this isn't a full scale messaging implementation like Quickblox. They have a library of UI components that can be used to help build a complete app - Atlas.
If you use a backend as a service you will always have to build the chat client yourself. If you go with one of the more general purpose options like Firebase, you will also have to build your own messaging protocol.
These services will save you time when it comes to the real-time server implementation, server configuration and scaling.
XMPP
Another option is to host an XMPP server yourself. There are a number of open source XMPP servers available:
ejabberd
Prosody
OpenFire
XMPP servers will provide you with a large amount of messaging functionality out of the box. They generally don't include any location awareness but this could be solved by configuring the server to host the user database on a separate server - that would allow you to add extra tables to handle the geolocation. An alternative would be to use presence to update relevant devices when a user's location changed by a certain amount.
To build the client I would recommend using Smack. Since XMPP is an open standard, your client should be able to work with third party XMPP servers and clients.
If you don't want to build the client yourself there are a number of open source projects (mostly under copy left licenses) which could act as a starting point. Xabber would be one example but you can find more by searching. Alternatively, you could use this a commercial open source project.
Building the server yourself
The final option is to build the messaging server yourself. This has the benefit that you could add the features you need and keep it reasonably simple. A good approach would be to use Symfony and the WebSocket Bundle for the real-time back end and Android WebSockets for the client. Using this approach you would have a lot of flexibility implementing the geo location functionality.
I & my team, we are working on Backend as a Service platform called QuickBlox.
We have great example how to integrate Map/Chat features to your application:
Simple Android Map/Chat application: https://quickblox.com/developers/Android_XMPP_Chat_Sample
We have been working very closely with the developer community and have developed Applozic Chat SDK which takes just 10 mins for integration. Give it a try: Applozic
Sample code with open source sdk is available in Github: https://github.com/AppLozic/Applozic-Android-SDK
I dont know about the about GMaps but for implementing chat you can try following link
Xmpp
Adding a chat functionality, you can use Firebase or XMPP.
For choosing the right option you may prefer this
https://www.quora.com/Which-protocol-is-better-to-develop-a-chat-web-app-using-Firebase-XMPP-or-HTTP
OR
If you have strong knowledge of backend technologies, go ahead with your own. And the same time, there is also an instant solution available in the market that helps to integrate the additional functionality more easily.
We provide a real time chat SDK solution called ChatCamp. You would be able to add chat functionality to your Android app quickly with the help of ChatCamp SDK. Here is the link to Android quick start guide - https://docs.chatcamp.io/docs/android-chat-quickstart. Also, it is possible to order the user list based on the distance from a particular location or you may show online users on top of Google Maps.

Categories

Resources