Android: checking IP of your devie





$ adb shell netcfg
lo       UP                                   127.0.0.1/8   0x00000049 00:00:00:00:00:00
can0     UP                                     0.0.0.0/0   0x000000c1 00:00:00:00:00:00
can1     UP                                     0.0.0.0/0   0x000000c1 00:00:00:00:00:00
can2     UP                                     0.0.0.0/0   0x000000c1 00:00:00:00:00:00
can3     UP                                     0.0.0.0/0   0x000000c1 00:00:00:00:00:00
tunl0    DOWN                                   0.0.0.0/0   0x00000080 00:00:00:00:00:00
sit0     DOWN                                   0.0.0.0/0   0x00000080 00:00:00:00:00:00
ip6tnl0  DOWN                                   0.0.0.0/0   0x00000080 00:00:00:00:00:00

eth0     UP                                 192.168.1.4/24  0x00001043 00:04:a3:92:d4:0b

If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

Donate Bitcoins



As an Amazon Associate I earn from qualifying purchases.

Android: checking IP of your devie





$ adb shell netcfg
lo       UP                                   127.0.0.1/8   0x00000049 00:00:00:00:00:00
can0     UP                                     0.0.0.0/0   0x000000c1 00:00:00:00:00:00
can1     UP                                     0.0.0.0/0   0x000000c1 00:00:00:00:00:00
can2     UP                                     0.0.0.0/0   0x000000c1 00:00:00:00:00:00
can3     UP                                     0.0.0.0/0   0x000000c1 00:00:00:00:00:00
tunl0    DOWN                                   0.0.0.0/0   0x00000080 00:00:00:00:00:00
sit0     DOWN                                   0.0.0.0/0   0x00000080 00:00:00:00:00:00
ip6tnl0  DOWN                                   0.0.0.0/0   0x00000080 00:00:00:00:00:00

eth0     UP                                 192.168.1.4/24  0x00001043 00:04:a3:92:d4:0b

If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

Donate Bitcoins



As an Amazon Associate I earn from qualifying purchases.

Android: start app on reboot

In this tutorial we will learn how to start an app (Activity or Service) on Android reboot.



As an Amazon Associate I earn from qualifying purchases.

Android: start app on reboot

In this tutorial we will learn how to start an app (Activity or Service) on Android reboot.



Step: Android manifest

        <receiver
                android:name=".BootBroadcastReceiver"
                android:enabled="true"
                android:exported="true"
                android:label="Start SMS on boot">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
            </intent-filter>
        </receiver>

    </application>

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
</manifest>



Step: BroadcastReceiver

package com.chicagoandroid.android.app.sms;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
/**
 * Created by uki on 11/22/14.
 */
public class BootBroadcastReceiver extends BroadcastReceiver {
   @Override
   public void onReceive(Context context, Intent intent) {
      if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
         Intent serviceIntent = new Intent(context, MainActivity.class);
         context.startService(serviceIntent);
      }
   }
}



As an Amazon Associate I earn from qualifying purchases.

Android: detect your own phone number

In this tutorial you will learn how to detect your own phone number programmatically



As an Amazon Associate I earn from qualifying purchases.

apt quotation..