I am a beginner in java and php.
My application is made of 2 parts:
server side (php)
client side android device (java).
Whenever the admin on the server side wants, he can send request to the android for its location coordinates even if the application on android is not running.
I managed to create the java file that will detect the mobile location and save it in a variable on the android.
My question is, how to enable the php(server side) to send request that will start the action of finding the location coordinates on the android?
thank you for the help in advance!
You can add push notification capability to your app using Google Cloud Messaging for Android.
Related
I have built a Java Spring Application. This application in the end after doing its work pushes data to a sqlite database.
Now the functionality that i want to add is: Once data is pushed into db, i want to send a custom notification on an app running on android wear. This custom notification should have a message and some options for user to respond to. Finally on seeing the notification on android wear the user should select one of the options and that should be stored in a database.
As i am new to android development, I cannot understand three things:
1. What kind of android application should i develop?
2. How can this android application receive some message or data from some other service (in my case java application)?
3. How to save user response to database?
Some guidance would be really appreciated.
Thanks
I will try to answer all your questions. If your current Java application is a web app, then you will end up building a mobile/wearable app that will communicate to this web app. If your current Java application is not a web app, you will either have to integrate its logic into the mobile/wearable app directly or turn it into a web app so it can communicate with the mobile/wearable app.
You will end up developing two Android apps, essentially. A mobile app for the mobile device and a wearable app that will communicate with the mobile app. This can all be done in Android Studio and in one project though, so it will basically be one application at the end of the day.
Like I mentioned above, you will have to either integrate that existing application's logic directly into your new Android mobile app, or turn your Spring app into a web app and host it on a server that your Android mobile app can call out to to get data.
Android has the concept of local databases and can actually use SQLite on the device. This is most likely how you would store the response from your service.
Hi I am developing an webview app using Java and Objective-C. My client wants me to implement push notification in the app. But no push notification service (like firebase, OneSignal) is added in the website. is it possible to add push notification in the app??
Badly need some suggestions.. Thanks in advance..
You can still use Firebase when you dont want to add it to website.
i did it so :
FCM service on andoid registers device token to my MySQl server, my Webpage generates Push notifications, with PHP and Cron by selecting tokens from SQL.
When you want to create push notifications, then you need to add something to webpage anyway. (you have to generate message and also send them to devices who have installed your app. :). )
So :
FCM, MySQl, PHP/Java/js or something what selects message and token and sends them to FCM, FCM sends it to devices.
Can anyone help me in details how to send push notification for iOS device while I am using Java for server side program and I am using Google App Engine.
Thanks.
First you must have access to Sockets Java API, which requires you to enable billing.
Second, use the java-apns library. It needs some modifications to run on AppEngine.
I'm aware of GCM services for push notifications, but I have this issue.
I have a android app which will send a data to a local web server (php) that will response to another android device with the data sent, a normal push notification with GCM, I think.
But I need this to work even without internet, because it is a local web app that will work only that.
Is that even possible? Android device X send json data to web server that will send the data to other android device Y.
How can I verify that exists new data in the device Y ?
Thanks. I know its a little wierd.
Yes, it is possible. But it is not easy to develop. This is why:
Push notifications work attached to an account service. So you would have to implement an Authenticator service and then the whole push platform yourself.
I would not use GCM for what you are doing though. If it is working on a local network, you can use "polling" (request the server every now and then for updates)
I am new in Android and trying to develop an app with push notification. I have a small confusion on the architecture behind the c2dm, that after getting the authentication token and device reg_Id, the application server will send them along with the message, but how will the server will know to send the message to the c2dm server?
I am getting an error and even I am not able to add a google account on my emulator for synchronization. While doing this my emulator says com.android.calender not there.
Thanks in advance.
you have to call web service to sent push notification on particular device. And whatever the massage you want to pass on device is written in web service. you can make web service any any language like php or .net. Ask me if you have any query regarding push.