kevin Abel wrote:I'm having a lot of success working with a tutor on preply.com to learn how to write an Android Application. . . .
Hey Kevin,
It sounds like you have a clear vision for your Android app, and it’s great that you're making progress with your tutor! Here are some thoughts on your requirements:
Wake Up Periodically: You can use a Handler or AlarmManager to schedule the app to wake up every 15 minutes.
Desktop Icon: Ensure that your app is set up correctly in the manifest file, which should automatically place the icon on the home screen after installation.
Persistent Open: You can manage the app's lifecycle in the onPause and onResume methods, keeping it running in the background.
Multitasking Behavior: To control visibility in the multitasking area, use Activity flags in the intent to control how the app appears. You might consider using a foreground service for tasks that require running in the background without showing a UI.
Switch for Frequency: Implement a simple SharedPreference to allow users to set how often they want the app to wake up.
Hibernation and Processing: Utilize services that can run tasks in the background without needing the UI active.
As for battery saving, hibernating apps can help conserve power. Communicating with Android’s OS can be done through its various APIs, allowing you to access battery stats, manage background processes, etc.
Your approach to keeping things efficient and minimizing unnecessary resources is solid. Good luck with your app development!