timer in message application - java

HELLO Developers,
I have taken over a project in android environment which i am completely new to, which imbibes a timer facility so that user can time his sms to be sent. Which messaging API will prove to be a help in this. Hoping to get good response from your side.

You don't need a messaging API. SMS sending is included in the Android SDK. To delay the sending I would recommend to use a Timer and schedule it with an delay:
http://developer.android.com/reference/java/util/Timer.html#schedule(java.util.TimerTask, long)

Related

How to create a Countdown timer that runs even when the app is completely closed?

I am trying to create a timer (in a game project) that will countdown 24 hours (even when the user closes the app) and then it will send the user a notification that says the timer finished, but I can't code a Countdown timer that runs when the user closes the app, I have used countdown timer that works with broadcast receiver but it stopped working after the use closed the app completely(probably due to Oreo+ background process limitations).
Can anybody help me?
Not close to my computer now, so can't write code, but you could do several things.
If you already have some kind of a backend, you could then set up an endpoint that will schedule a notification to the device.
So I guess once the user clicks a buttom, You would send a request to the backend and then after 24 hours, server sends a notification (via Firebase cloud messaging, for example).
That way, you are 100% sure user will receive it no matter whether the app is open or closed.
I suggest that you explore (remote) push notifications.
I hope this helps.

Can/how would you do a publish/subscribe real time mobile app with Ionic 3 and Java server side?

Is it feasible to have Ionic 3 react to server-side events fired from a Tomcat App, to update a model in real time. And make sure events fired from server are received in the order sent.
At it's simplest, if the server sent a notification with a random number that the Ionic App could refresh as it receives notifications. And maybe some sort of sequence number in the payload that the client also keeps track of.
If so, could someone post an example. Thanks.
Also, if the client misses notifications, you'd probably have to re-pull the whole model, what techniques would people normally keep the app up to date, accurate, robust, and responsive.

Regarding schedule time for sending email

Need to schedule time for sending email via javamail on Google app engine, I already tried OOP MailScheduler for this but at the end I am getting error due to it does not support for Google App Engine, it only support to Tomcat, is there any other efficient way to schedule the time for sending emails.
When you create a task and add to the task queue, you can specify when this task should be executed.

Android app uninstallation event for analytics

I wonder what are the ways/patterns to detect app uninstallation for any kind of analytics on android? I know the limitations of ACTION_PACKAGE_REMOVED intent - not received by application being removed. I am using flurry at the moment and have also discovered that they do not provide any kind of support for deinstallation events. This type of event is definitely something you want in your analytics but so far have not found any clear solution. Any ideas?
Here's a possible approach. In your Android app, implement support for receiving push messages from Google Cloud Messaging (GGM). Then, implement a server that sends GCM "are you there?" messages to all users at regular intervals (e.g. daily). Google's GCM service will notify your service of all targeted recipients which no longer have your app installed. To correlate uninstall data with other metrics such as app version, user demographics, date of installation, etc, collect that data in your app and supply it to your server when registering for GCM messages. Then when you get notified of an uninstall, match it with the installation data. From there, you could report it to a service like Google Analytics for additional slicing and dicing, graphical visualization, date range comparison, etc.

How can I send a notification?

I am developing an Android App that communicates with a server.
How can I send a notification from my server to my Android App without the use of C2DM?
Are Sockets a good solution? What are other alternatives?
I'd suggest you to develop a webservice preferably with JSON which is easy to handle. This server client architecture will hellp you to send and receive any kind of data (ranges from raw text to images or even video)
Check out C# webservices. That are very easy to start than the PHP services IMHO.
Depends on what you want to do.
have you thought on how does the server identifies the client to send the message ? In this case the android phone ?
With http you would need the client to "request" this notification.
The closest thing to an actual notification would be to have a socket connection, which the client would connect to the server. But then would require an existent connection between the two. If this is ok for what you are doing, then go ahead if you really want to avoid C2DM.
But, using C2DM allows your server to send notification to devices without a need for a request or direct connection from the client. The only thing you need to do is pass the identification of the device to your third-party server given when you authenticate with google's C2DM. After that, you just push notification data to C2DM and google delivers the notification for you.
I've used MQTT for providing push notifications on Android and it's proved to be a good, reliable, low power solution.
Some links to support my case / get you started:
http://mqtt.org/
Power Profiling: MQTT on Android
Basic Steps for Using MQTT in android

Categories