Friday, 25 November 2016

Share Intent in Android




       
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "Sri has referred you to Signup for app, Please download the app");
sendIntent.setType("text/plain");
startActivity(Intent.createChooser(sendIntent, "Invite"));

       
 

Thursday, 6 November 2014

Connect Android phone wirelessly to ADB for Testing

Remotely connect real device with Eclipse.

Now we can easily connect the android smartphone with eclipse wirelessly.
Eager to know, Here is the code.

Required:- Your phone should be ROOTED.

Now Just Download Terminal Emulator app from Here in your phone.

Now that you are ready, Let's proceed.

Open the Terminal Emulator and type the following

    su
    setprop service.adb.tcp.port 5555
    stop adbd
    start adbd


Now that your phone is ready to get connect let's connect it from computer,
Go to Command in run.
Go to {SDK_PATH/platform tools}
Then enter adb connect {ipaddress of your phone}
Ex:-adb connect 192.168.1.5

IP Address of phone can be know by this app Here.



Saturday, 30 November 2013

R cannot be resolved to a variable.

R cannot be resolved to a variable

R cannot be resolved to a variable or R.java file missing????
This is the most common error which occurs.
There are simple testing to overcome this error.

1.Check all the xml files in <my project>/res folder.
2.xml files means it may be layout files,string.xml, dimens.xml, styles.xml.

This error is occured because the ADT cannot build the code if there's any error in xml file, by which the project will not generate the automated generated java file means R.java file.