There is no hook in B2G to facilitate this, so you need to modify the system app. That's why you need to have a rooted device. If you're working for a device manufacturer they can just ship the modified codebase.
On Tue, Mar 3, 2015 at 9:54 PM, Rabbi Hossain <[email protected]> wrote: > > > Date: Mon, 2 Mar 2015 01:52:19 -0800 > > From: [email protected] > > To: [email protected] > > Subject: Re: [b2g] Background Service or API to Monitor Phone's Apps > > > > On Sunday, March 1, 2015 at 7:35:42 PM UTC+1, Rabbi Hossain wrote: > > > Hello All, > > > > > > I am currently building an app for some of my personal experimental > project. Since I don't have that much knowledge on B2G APIs available for > use, I am stuck in something. Currently the the I want to do is somethink > like this, > > > > > > "When an user opens an app from homescreen, My app will track it and > will show a notification before opening that app." > > > > > > > > > Is this thing currently possible in B2G? Any code snippet or API > reference available? > > > > > > Thanks in advance. > > > > > > Regards > > > Rabbi Hossain > > > > You'll need a rooted phone, but the code lives here: > https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/app_window_manager.js#L632 > > Thanks Jan for this thing. My app is currently a Certified app and I am > running a rooted device. > Curious mind wants to know, why rooted device is needed? Just because it > uses any sort of Certified API? > My app will be certified app and will come pre-installed with non-rooted > device I think. In that case I don't think it will be a issue. What do you > think? > > > _______________________________________________ > > dev-b2g mailing list > > [email protected] > > https://lists.mozilla.org/listinfo/dev-b2g >
_______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
