• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Android: advice on method to wake up CPU from sleep, carry out a task then go back to sleep

Hi, I have created a time lapse camera app that collects images during daylight hours and uploads those images to an FTP server. I now need to add a method to prolong battery life by putting the cpu to sleep at night, wake it up in the morning, collect and image, then go back to sleep in-between image collections (15 - 20 mins). The code i have used so far is based on the processing IDE with some android based java as well where necessary.

I have tried using wake-locks which didn't seem to work and have had a look at the AlarmManager class which might be the way to go but my programming skills aren't great. The AlarmManager class had an example that (i think) could wake the cpu at a given time then use the setRepeating method to wake up the device every x minutes after that. Is this correct? However i need it to stop doing that at night and repeat the next day(s) which adds another layer of complexity.

Any advice on this and/or example code to get me started would be much appreciated.

Cheers

purchase new Chromebook

i have a pixelbook and i love it. i got it on sale for $799 at Best Buy.

good luck finding a samsung chromebook with a ssd that is under $500.....well at least a decent one. i found some on amazon, but those sammy's have a 16g ssd.....not really worth it.

samsung galaxy chromebook 2, at least looks real good. but some say that their first galaxy chromebook is better then the 2.

the 2 is on sale at Best Buy:
https://www.bestbuy.com/site/samsun...-64gb-emmc-fiesta-red/6450560.p?skuId=6450560

Media Service Issue

First, let me say what you may already know- stock apps generally suck.
Thankfully, there are nice replacements out there that do a much better job.

Settings
Storage
Phone
Apps
(show system)

What are the largest, and can the caches be cleared?
This can save at least enough space to try to get some room to work with.

I try to maintain about 70% or less used internal space.
Because some phones include the system in their percentage, I use an app that shows the percentage used that is available to the user.

https://f-droid.org/en/packages/com.kgurgul.cpuinfo/

If you have an SD card, you will see three listed memory used percentages.
The first two are one and the same.

As replacement for clumsey stock utility apps, I use a catalog of apps from Simple Mobile Tools.

https://www.simplemobiletools.com/

For now, at least try the file manager and the gallery.
The gallery is a great video player as well.

https://f-droid.org/en/packages/com.simplemobiletools.filemanager.pro/

https://f-droid.org/en/packages/com.simplemobiletools.gallery.pro/

These two work seamlessly together and will make you wonder how you ever dealt with the rest.

Use them to move any personal files like pics, videos, and documents to the SD card.

After this, there is one cleaner app that tells the truth about cleaner apps, and does all that a cleaner app can actually do.

https://f-droid.org/en/packages/theredspy15.ltecleanerfoss/

Please be sure to go through all of the settings, and engage the whitelist.

This is a real cleaner and you must be sure that your valuanle files are not in its path.

You mentioned that 'everything is updated'.
When apps are updated, they grow.
Eventually, they get so big as to intrude upon your space- and eventually even the proper function of the device.

Be sure that Auto-Update in the PlayStore is turned off.
There are various reasons for this, but for now, in your case, you don't need updates for any apps that you don't use.

Speaking of which, if you have discovered suitable replacements for any stock apps, see if the stock ones can be disabled.
Do the same for any apps that you don't use.
Built in system apps can only be disabled, but user apps can be downright uninstalled.
When uninstalling, be sure to clear all data first.
This insures that all files and data of the app is gone.

These things can save a large amount of space.

Now check what CPU Info says again.

Let me know what your results are.

Filter

Back
Top Bottom