Hey there, I am making a live wallpaper that uses accelerometer data and consequently needs Context from the parent Activity un order to talk to the sensor, this is fine in any typical application but (without looking at the source code, I think i might shortly though) i suspect that something like moveTaskToBack is being called prematurely which makes the program lose context. Ill show a quick snippet where this becomes an issue:
This only occurs in wallpaper export, and I'm not the strongest in Android Java so I could be completely off the mark here but assuming what I suspect is correct a way to solve it may be by adding a built-in method to get the parent context (that returns the parents Context as a string) which could be assigned in the onCreate method?
Really got no clue with the backend of this stuff since my experience is limited however I am fairly certain that there is no way to obtain the required Context for Wallpaper mode.
Thanks for your time, and if you have any more questions on the issue you'd like to ask feel free to and I'll get back to you when I can, I'm a little off the grid at the moment but I'll do my best to stay available in case there's anything else you need :)
Hey there, I am making a live wallpaper that uses accelerometer data and consequently needs Context from the parent Activity un order to talk to the sensor, this is fine in any typical application but (without looking at the source code, I think i might shortly though) i suspect that something like moveTaskToBack is being called prematurely which makes the program lose context. Ill show a quick snippet where this becomes an issue:
Returns![Screenshot_20210108-142724_APDE.jpg](https://user-images.githubusercontent.com/26962602/103971051-b3137e00-51bd-11eb-995e-f9211008cfb7.jpg)
This only occurs in wallpaper export, and I'm not the strongest in Android Java so I could be completely off the mark here but assuming what I suspect is correct a way to solve it may be by adding a built-in method to get the parent context (that returns the parents Context as a string) which could be assigned in the onCreate method?
Really got no clue with the backend of this stuff since my experience is limited however I am fairly certain that there is no way to obtain the required Context for Wallpaper mode.
Thanks for your time, and if you have any more questions on the issue you'd like to ask feel free to and I'll get back to you when I can, I'm a little off the grid at the moment but I'll do my best to stay available in case there's anything else you need :)