ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.45k stars 2.19k forks source link

onTrimMemory is used only for API level 14 , I need to detect when app is backgrounded for api level <14 #3616

Closed sabrinemoumni closed 9 years ago

sabrinemoumni commented 9 years ago

onTrimMemory is used only for API level 14 , I need to detect when app is backgrounded for api level <14

What can I do to detect when app is backgrounded like new relic I should'nt use the life cycle of activity

sabrinemoumni commented 9 years ago

ok I test
https://github.com/Cheesebaron/KioskModeSample/blob/master/KioskMode/KioskService.cs#L59 but I have a fear , I wonder if it needs more resources of cpu and memory cause I will get all running task every second for exemple ? concerning the life cyle, I can't intercept these methods

flerda commented 9 years ago

Is this a question relating to AnkiDroid? I think you might have posted this in the wrong place.

sabrinemoumni commented 9 years ago

No it is not the wrong place, I saw this issue Remove caches when receiving onTrimMemory #2264
is there any relationship between your project and ontrimmemory?

sabrinemoumni commented 9 years ago

!!!!!!!!!

flerda commented 9 years ago

No, there is no particular relationship between this project and onTrimMemory().

Someone suggested using that API in our app but we do not define the API and how it works.

If you are looking for documentation on onTrimMemory() you can look at the official documentation on http://d.android.com or ask on StackOverflow (or some other forum). If you are trying to fix a bug in AnkiDroid, you should add comments to the bug itself, rather than opening a new issue.

sabrinemoumni commented 9 years ago

OK , it is not an API , it is a function onTrimMemory()

sabrinemoumni commented 9 years ago

it's true, it is not the right place to post this issue :)

flerda commented 9 years ago

:) Good luck!