Reputation: 386
I am planning of creating an app as a background service which is triggered when the user selects a piture in the gallery.. Basically I want to make use of sensors to scroll between images.. For example..If the user shakes the phone it should display the next image in the gallery. Could anyone please help me out as to how to know whether the user is in gallery??
Thanks
Upvotes: 0
Views: 177
Reputation: 4219
By 'gallery' you mean the Gallery app that comes pre-installed in the device? If so, I don't think that what you are asking is possible.
Since Android apps run in sandbox, they can't communicate with each other unless you have the needed permissions, or API to do so. And I doubt the default Gallery app does anything sort of like that.
The best thing you could do, is write your own gallery app and implement that feature for it. Or even better take a good look at the default Gallery app's source, and extend it ;)
Upvotes: 1