prey / prey-android-client

Android client for the Prey anti-theft software.
http://preyproject.com
GNU General Public License v3.0
429 stars 184 forks source link

Auto-enable mobile data network #17

Closed caruccio closed 12 years ago

caruccio commented 12 years ago

Hi, this is a feature request, not a real issue.

Prey should be able to auto-connect to mobile data network upon activation.

Imagine you lost your phone in a place without wifi (happens to me all the time). Chances are that a mobile network is available, since it is almost omnipresent these days.

According to this thread (http://stackoverflow.com/questions/8354530/how-to-enable-data-connection-on-android-2-3) it is possible to programmatically enable/disable mobile network without user intervention on android up to 2.3 (probablly any android version too).

PS: Sorry for not submiting a patch. Right now I'm on a trip with no access to my development environment.

cyaconi commented 12 years ago

As Prey supports devices starting from 2.0, this feature won't be available for all devices. Moreover, this is hidden API, so can fail in some devices.

We'll add the feature though, but with a warning to the user.

Thanks for the idea and the link.

Best

arjamizo commented 10 years ago

I am wondering is this feature implemented by now?

edit: after looking for setMobileData keyword I have found https://github.com/prey/prey-android-client/blob/152eda6c615122bbeae6171afb166deba506b684/src/com/prey/net/NetworkUtils.java#L51 and later https://github.com/prey/prey-android-client/blob/152eda6c615122bbeae6171afb166deba506b684/src/com/prey/actions/sms/SMSFactory.java#L34

which seems to enable this feature once there's activation sms sent to the device.

Brilliant!