Android continuous running service [duplicate] - java

This question already has answers here:
How to Implement chat application for Android? [closed]
(3 answers)
Closed 8 years ago.
I am trying to do simple chat application using android.
Like whatapp, I want to run background service continuously whether activity is running or not running.
2.When I get message, then there should be notification.
Once clicked on notification, activity will be opened.
Using which API, I can do above all those things?

You can find details, specs and examples here: http://developer.android.com/guide/components/services.html
Be advised that the services running all the time drains the battery, so ideally you want a mixed solution with GCM, if you're communicating with the server to receive messages.

you can use Services and Notifications ...
I did a little application that lunches a notification from a service . it is free without license ... you can find it here .
good luck

Related

How we perform the background operations when app is kill in android [duplicate]

This question already has answers here:
How to execute background task when Android app is closed / set to background?
(4 answers)
Closed 2 years ago.
I need to perform background operations when my app is completely killed.I want to send data to the server in every 10 second when my app is killed. how to perform this task.
When Android kills your app process, it can do nothing at all. Android prevents apps from doing background work in order to save battery and bandwidth for the end user. Only system processes can stay running indefinitely. I suggest reading the documentation to understand how it works.
If you want to do background work in a battery-efficient way, you should use WorkManager to schedule that.

Java. How to make a bot [duplicate]

This question already has answers here:
How can a program control another program?
(11 answers)
Closed 8 years ago.
I wonder is possible to make a bot writen in JAVA, which will open some program(program is under windows), click on the button in this program and type some data, check status of this program(login or logout, this is client for online game).
Which JAVA tools I need ? I think that java robot lib is not enough for this.
Thanks in advance.
You cannot do this using JAVA.
JAVA is a language which is loosely coupled with operating systems, so it can only receive mouse/key messages from underlying OS. Among all the tasks you mentioned , it can only start the program by using Runtime.execute.
If you want to implement a software like this ,you should use Visual Studio and use Microsoft technologies.

Extract SMS from Android [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How can I read SMS messages from the inbox programmatically in Android?
I'm trying to build a program that extracts SMS from android devices through a java program. Does anyone know an API that does this?
I'm aware the SMS (the backups anyway) are stored in a database so I was hoping to find this database on the phone, extract it and then load it into a database.
Check the following link.
http://www.apriorit.com/our-company/dev-blog/227-handle-sms-on-android
Manas provided a good link.
Here is another one that I used.
http://www.androidcompetencycenter.com/2008/12/android-api-sms-handling/
is broken => try via archive.org
I think you are referring to reading the database. If so,then this question is a repost, see here:
How can I read SMS messages from the device programmatically in Android?

Enable App's market updates programmatically [duplicate]

This question already has answers here:
Any Android Market API from Google? [closed]
(2 answers)
Closed 9 years ago.
I'd like to add a check box to the App preferences for allowing the user to select if he wants or not automatic updates from Google Play for this app.
Is that possible? Is there some kind of API or call for setting this property? Thanks
This is all handled transparently by the Google Play app, where there are options for users to choose whether to allow automatic updating. There is no API for your app to manage this.

XMPP starter - with java [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
XMPP starter - with java
Please help me in getting started with XMPP, as I am going to start working on a Java project soon and I will be implementing this protocol. I need to get started soon but I couldn't find many resources online. How do I give input to the server and then receiving the msg back? How do I communicate with the ISB and client-xmpp-xlient? Any other basic suggestions are welcome. Thanks!
Have you looked into the Smack XMPP client API for your project?
http://www.igniterealtime.org/projects/smack/index.jsp

Categories

Resources