Search This Blog

Showing posts with label android. Show all posts
Showing posts with label android. Show all posts

04 January, 2018

Using adb shell for dialing and receiving calls in android

You have to enable the Developer Options and also the USB debugging
We can use adb to trigger a call, receive incoming call, see the below adb commands
For dialing a call using activity manager adb shell am start -a android.intent.action.CALL -d tel:123456789
accept/receiving an incoming call: adb shell input keyevent 5
hang up/stop phone call: adb shell input keyevent 6

18 February, 2016

Android Showing IP address and Route Table

For checking the IP address and Routing Table in Android using command line mode in the linux console is below. For this you need to root the device or it should be engineering build which engineers use for development.

To Show IP Address, MAC address and Interface Status
Type  netcfg  or ip addr

To See The Routing Table
cat /proc/net/route   OR   ip route show

To show DNS IP Addresss
getprop net.dns1
getprop net.dns2

net.dns1 for the Primary DNS and net.dns2 for the Secondary DNS

For changing the DNS IP Address:
setprop net.dns1 111.111.111.111
setprop net.dns2 222.222.222.222




21 May, 2014

Android Hidden phone informations

1) *#*#4636#*#*
give you details about phone details like below
  • Phone Information
  • Battery INformation
  • Usage Statistics
  • Wi-Fi Information

2) To get IMEI : *#06#  works with types of mobiles

22 February, 2013

R cannot be resolved android error

when i was doing the android app, the below error was coming after developing for some time when i opened the eclipse.

R cannot be resolved 

even though the same code was working  previously. after googling found that if we clean the project form the menu

 select "Project" -> "Clean..." 

Hope this helps for others. 

08 February, 2013

taking screenshot in android 4.0 and above

 Taking a Screenshot in Android 4.x

To take a screenshot on your android device from version 4 and above , press the Volume Down and Power keys at the same time.

The screenshot will be saved on the gallery->Screenshots folder, \


you can select it and share through mail/bluetooth etc. and other sharing methods available, same as sharing a normal photos.

05 January, 2013

android: sending SMS programmatically


In android app, if you want to send SMS using the carrier network, you can use the below function. Pass the destination mobile number and the SMS string within specified characters.


public boolean sendSMS(String dstAddress, String smsMessage)
    {
   
    try {
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(dstAddress, null, smsMessage, null, null);
Toast.makeText(getApplicationContext(), "SMS Sent!",
Toast.LENGTH_LONG).show();
} catch (Exception e) {
Toast.makeText(getApplicationContext(),
"SMS failed, please try again later!",
Toast.LENGTH_LONG).show();
e.printStackTrace();
return false;
}
return true;
    }

tmux enabling mouse interaction

Add the below line to the ~/.tmux.conf setw -g mouse on save the file and exit from the tmux shell, you should be able to use your mouse to ...