2

I recently lost my Android device. However, I can see that it is still connected to the internet via wifi (my chat status shows up as idle on friends' gtalk). I'm also able to remotely install apps via the Google Play. I wish to create an app that can send the global ip that the device is connected through, to my email address, as soon as I remotely install it.

Is this possible? If so how do I go about it?

2 Answers2

0

Could you not just use a app from the app store that does this already like

Lost Droid Finder · Lost Phone

or

Android Lost

9koni
  • 31
  • 5
0

Interesting. You can create an app with a BroadcastReceiver that registers for common intents like app install, uninstall, replace, call, send, view etc so that your code runs next time the person does pretty much anything useful. Then in the onReceive() you can get the ip address and to send the mail without any user interaction you can refer this

Declare the broadcast receiver in your AndroidManifest xml like:

    <receiver android:name="com.your.app.UserActionListener">
        <intent-filter>
            <action android:name="android.intent.action.PACKAGE_ADDED" />
            <action android:name="android.intent.action.PACKAGE_REMOVED" />
            <action android:name="android.intent.action.PACKAGE_REPLACED"/>
            ....add actions for edit, view, send, call, dial etc here
            <data android:scheme="package" />               
        </intent-filter> 
    </receiver>

You can keep adding to the above list of actions to capture whatever you wish.

In the code, add a class as:

public class UserActionListener extends BroadcastReceiver
{
@Override
public void onReceive(Context context, Intent pkgIntent)
{
    Log.d("onReceive");

    // get ip address here and send silently
}
}

This way, you capture most of the action that the person with your device will be doing like uninstalling applications, opening documents etc.

Mind you, for your method to work, you will need to upload your app on GooglePlay.

Community
  • 1
  • 1
Rohan
  • 428
  • 5
  • 10