Comment 110 for bug 604635

Revision history for this message
In , Mounir (mounir) wrote :

(In reply to Jonas Sicking (:sicking) from comment #74)
> Again, long term I think we should allow applications to replace parts of
> the platform. I.e. it'd be cool with applications which can replace the
> status bar, the virtual keyboard, the lock-screen, the "desktop" etc. But I
> don't think we should worry about that for now. iOS doesn't allow any of
> that, and Android allows little, if any, of it.f developers ask for it.

AFAIK, Android allows apps to override the home screen and the virtual keyboard.

(In reply to Justin Lebar [:jlebar] from comment #76)
> Anyway, other use-cases for keeping the connection alive include: A music
> sync app. Maybe it only syncs while your device is on wifi and plugged into
> power, or something. Or even consider an e-mail app which wants to check
> your e-mail while the device is asleep and buzz when you get mail.

Also a twitter client or any kind of server like sshd running on the phone.

(In reply to Chris Pearce, Mozilla Corporation (:cpearce) from comment #75)
> (In reply to Jonas Sicking (:sicking) from comment #74)
> > [...]
> > The third use-case that people has mentioned is wanting to keep different
> > types of network connectivity (wifi/3g/2g) alive. I don't yet fully
> > understand this use-case though, so a few questions:
> > * Can someone provide an example of what type of app needs this.
> > * Would the connection be held open even if the user presses the "sleep"
> > button. (I presume yes?)
>
> An IRC client. The IRC client I tried using on android got shut down when I
> sleep the screen, which was annoying. An SSH or chat client might be another
> example.

On Android, network connections can be requested and used even when the screen is shut down. However, all applications are considered as backgrounded and some applications might do some things in that situation or even be killed.

> > * Do we need fine-grained control over which connectivity should be kept
> > alive? I.e. does the app need to be able to say "hold 3g alive" or "hold
> > wifi alive". Or is it enough to be able to say "hold data-connectivity
> > alive". The latter seems more convenient for pages. The question is if it
> > supports all use-cases.
>
> I think it makes more sense to let the user specify this at a platform
> level, i.e. have a setting somewhere in the device's config saying "only
> allow apps to use wifi when screen is off" etc.

That might be interesting if Gaia could disable mobile and/or wifi connections in some situations like when the phone is sleeping and not plugged. Then, apps will be able to request a connection when the phone is sleeping and this will happen unless all type of connections have been disabled.

> So having the app request to keep data connection, without specifying what
> type of connection might be enough?

I agree with that: we shouldn't let apps require a specific connection (unless if the correct permission is requested). However, they should be able to warn users that they need wifi to be turned on for example.