push notification in android - android

please guide me how to implement the push notification in android. according to my application when server hits any information at any time i want to display that info at that time. what i need to implement this in my android plateform.

With Android 2.2 it is possible using the Cloud to Device Messaging.

As Alopix mentionned, the automatic way to do that is through Android Cloud, since Android 2.2.
Now If you want it before 2.2, here is what I choose to do to enable it in my application :
First, put a switch in your application, testing for the version of the Android system of the phone you are running on (with Build.VERSION and then the field SDK_INT).this way you know if you are in equal or above 2.2 or below.
Then, if you are below, you need to create a small php page, with for instance a timer, that will be executed regularly by your server, and you do a simple http request on this page to check if there are news available for your application.
Does that help?

Related

How to send update to a mobile app (Android & IOS)

I've a made a really basic chat application(no need to see the code)(from the course of Angela Yu, flutter)it is integrated with google firebase which uses firebase_core, firebase_auth & cloud_firestore packages for authentication and uploading chat data in cloud Firestore.
I've installed the app through debug.APK( 1. would it matter if it was release.APK?) in my & my friend's phone both android ( let's take a neutral approach i.e the phone could be either IOS or Android).
What I aim is if I change my code( or we say update my app) I would want my app on both the phones to get updated( either automatically if possible or send a alert when user opens the app to update it), all this should be done with free of cost. 2. How can I achieve this in simplest manner?. I know there is a standard way for this if the app was in Google play store or App store but I don't want to upload it on stores.
My guess for this is that we integrate our app with a server so that every time the app starts it checks for a update with the server and ask the user to update and gets updated. If this is achievable can someone please guide me with these two methods mentioned below:
3(A). through free online server( can we use github or firebase?)
3(B). and can I make my own laptop as the server and code the app such that it doesn't need the server to be always online.( as in if my server is online it checks for update else it continues)
3(C). through paid servers ( just for information)
(4) Also please tell me why we chose cloud firestore over real time database for a chatting application?
(I don't want to create a web app)
I've no idea how would any of this be achievable like nothing like what server would be used or is this even possible. So please help me with a detailed explanation on all( 1,2,3(A),3(B),3(c) ). Any help would be really appreciated!
Since you already use Cloud Firestore, consider creating a document in there with a field that contains the version number of the latest app release.
In your application code you then read this document upon startup, and check it against the app's own version. If the version from the database is newer, tell the user to upgrade.
You could even include instructions on where/how to get the latest version in the database too. That can come in really handy of you suddenly have to change your release mechanism in between versions.

How to notify my app about newly available resources on the server to download?

I have an app to display images in sequence (as a slideshow). Images are downloaded from the server and stored on the device then it is displayed in a slideshow using ImageView and TimerTask. I would like to tell the app that images have been updated on the server and force it to download them again.
How do I tackle this?
I used firebase messaging service and it worked like a charm. As some member(s) might have mentioned, the downside of using notification is that it can be switched off from settings and then you lose your communicate channel with the App. It's best to use web sockets to have a full communicative channel with the App (but again, 4g/wifi can be switched off as well..).
I have followed the following tutorial to get started.
https://firebase.google.com/docs/android/setup Click Here

Not getting any idea about the workflow of managing an android device from another device using an pre installed android in both devices

I have a new project at hand where I need to make two android applications
1)Main Controller application (be installed in one device say its name be X)
2)Sub Child application (be installed in devices that need to be controlled by X )
So I want to get an idea/picture about how one android device like (2) can be managed fully(i.e. blocking applications or making them accessible for some interval / block calls / track location of user ) from another device like (1). So far I searched Google ,asked my seniors about the same but none was able to help me out.Found many scattered info (like need enterprise app to do this i.e use android management API or Device admin ) but not being able to get any clear idea about the work flow.
Thus now this the last place I can think of for helping me out with this work flow.
Reference
Update: Based on what #Fred said i.e. to use android management API (also based on the answers that he posted here) could we somehow have own custom web server and manage the interactions that EMM console does with all the child apps through our own API's(the same API's which we would call from the parent app.) ???
In other words instead of controlling form the EMM console, I would like to control those child application from another parent android application.
By FCM or Socket programming you can easily communicate with other app. Suppose 2nd app receive a call then 2nd app call a api of server about the information, then server knock 1st app by fcm or socket, then 1st app make a decision and submit the decision to server by API, And finally server submit the decision to 2nd app by FCM or socket.
You can check out the Flyve MDM which is an open source mobile device management solution including both agent app and web panel for management.

Twilio Android SDK vs REST API for Chat and Video

I used the Twilio Nodejs and Android SDK quick starter programmable chat and these work great. I am confused by the following statement in the documentation:
The Programmable Chat REST API allows you to control your Chat applications from the server in much the same way you can from the client, except from a service perspective rather than a 1st person one.
Not really sure what this means? Can I develop Android app with out the SDK and use REST API? Why would I do that? SDK seems to be much more flexible and easy to use. Why would you control your app from the server?
What does "except from a service perspective rather than 1st person one" mean?
Twilio developer evangelist here.
If you are building an Android application then I recommend using the Twilio Chat Android SDK.
When the documentation references using the REST API from a service perspective it means that you can use the REST API from the perspective of your application rather than a user of the application. For example, if you need to send a message to your users that appears to come from your application admin you can do so using the REST API. That way you don't need to sign up a user and send messages from it. Alternatively, using the REST API is a good way to send and receive messages as a bot in the your chat system. You can also use the REST API to do system side maintenance on your chat instance (for example, you could close old, unused rooms using the REST API).
I hope this helps or gives you some sort of idea what you can do with the REST API. I still recommend the SDK for your user facing application though.

building a real time android app with parse android sdk

I want to build an Android app and want its features to be realtime. I will be using parse Android sdk as my mbaas. But its not real time. I once built a snapchat-like app. In the app when someone sends a photo to his/her friends, the receiver has to refresh their feed in order to see his/her message (photo). So i wish to know if it will be possible to use parse cloud (instead of parse android sdk) with nodejs to handle the logic or is there a better option. Thanks.

Categories

Resources