Android: Job Scheduler for planner [closed] - java

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 7 years ago.
Improve this question
I found out about Job Scheluder but I can't understand for what I can use it.
Is it suit to create planner, for example?
I want to launch notification in a month in setted day and time.
Is Job Scheluder good solution for that or I should choose something else? I want to find a good lib for this task.

No. JobScheduler is for short term background tasks like when you want to download a file in the near future and want the system to find an ideal time for you. E.g. you want to download a big update file and want the device to be plugged in and have wifi rather then when the user is low on battery and wouldn't want to loose the last bits of energy for some file.
https://www.youtube.com/watch?v=QdINLG5QrJc explains
http://developer.android.com/reference/android/app/job/JobInfo.html are the options you have to specify when you want your job to execute.
When you want to launch notifications at certain times look for AlarmManager http://developer.android.com/training/scheduling/alarms.html

Related

Is it possible to make an Android keylogger which works in the background in working time? [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 4 years ago.
Improve this question
A company asked me today that if I could develop a keylogger inside their company application which logs what their workers do in working time with their company phones. They suspect that not every employee works hard enough.
Well I know it's not ethical but I got curious whether it is at all possible? I think Android has enough security feature to make it stop an app like this. I saw some keylogger features on GitHub but they only log inside the app, not outside the other applications.
Another approach you might be able to take would be to develop a fork of the Keyboard, and force users to use that keyboard via a Device Administrator Policy. However, as previously mentioned, this might be in violation of a whole host of employee data protection laws.
Custom Keyboard Creation Tutorial: https://code.tutsplus.com/tutorials/create-a-custom-keyboard-on-android--cms-22615

Checking server every 5 minutes [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I saw 2 approaches to check a server in Android every X time, therefore I want to ask which way is better.
My application is requesting a HTML page from a server.
First option, is to run a service with sleep time of 5 minutes.
Second option, to set an alarm manager with interval time of 5 minutes that triggers a broadcast reciver.
Glad if you can tell me which way is better, or if there is a better way.
Thank you.
I would suggest using AlarmManager and set alarms every 5 minutes and use a BroadcastReceiver to get the message.
My reason is that when you run your service in the background, if OS needs more resources it will kill your service and get its resources for other apps but with Alarms you reduce the risk of killing your app.
Regarding checking server, you should consult this manual. just a single poll request to the server will make your radio active for at least 30s and will consume your battery. So maybe you should reconsider your intervals or even your strategy.
One other note: If you are just checking the server for new data and want to be informed if something has changed you can use Cloud Messaging. You can do most of the processing in the cloud and just send the important data back to the device(s). It is more efficient
i agree with #Pooya. Also you should implement a boot receiver so that your alarm will be set if the phone is rebooted. Here is the sample app that i downloaded from http://developer.android.com/shareables/training/Scheduler.zip

Cross-platform notification service [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 8 years ago.
Improve this question
I would like to develop an application using push notification service (like Whatsapp). What kind of service would I have to use to manage all kinds of operating system?
I would suggest using a backend like Parse.
http://www.parse.com
It's a good starting place and supports all different types of OS's.
It stores data, provides analytical stats and also allows you to send push notifications to 1 million unique devices - without paying a penny.
Hope this helps.
Cheers
Ryann

make bubble that move around the screen like facebook messanger [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 8 years ago.
Improve this question
I want to develop app in that i want to create a bubble like facebook messenger, i can move bubble around the screen on any view, also can delete the bubble same as facebook messanger does , it same looks like facebook messenger app is working
i have no idea how to start developing that, is there any other example then please suggest me
it should look like below picture (it is taken from https://play.google.com/store/apps/details?id=com.facebook.orca&hl=en)
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
Its call Global HeadView.
Try this out
https://github.com/PomepuyN/AndroidDemo/tree/master/GlobalViewHead
This has very good explanation how Views can be added using Service and Window Manager.
Also Broadcast Receiver is implemented which will trigger when the boot is completed and that will start the service.

Android Design Best Practice [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am in the process of designing my first Android application and have a best practices/design question. So not necessarily looking for code, but for someone to lead me in the right direction as far as research goes.
I am looking to have an application where a user kicks off a timer. When that timer has expired, the application will run some code. I need the timer to continue to run even when the user closes the application and/or reboots the phone. So even if the phone dies, once it is charged and turned back on I need my application to kick off and recognize the timer has expired and run some code or continue counting down (essentially checking to see if a particular date and time has been reached). In addition, I want the user to be able to re-launch the application and end the timer pre-maturely if desired.
I thought I was on the right track by creating a local service in a seperate process but further research shows that may not be best practice and to look into alarm manager with broadcast. So my question to the masses...what route should I be tacking to achieve my goal?
Thoughts/Suggestions? Thanks in advance!!!
I thought I was on the right track by creating a local service in a seperate process
That is an anti-pattern (everlasting service) on top of an anti-pattern (separate process).
what route should I be tacking to achieve my goal?
Use AlarmManager, plus a BOOT_COMPLETED BroadcastReceiver. The BroadcastReceiver can detect missed events, plus set up a fresh AlarmManager schedule.

Categories

Resources