1

I have this code.

TelephonyManager  tm=(TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
String showimei=tm.getDeviceId();
String viewimei = String.valueOf(imei);

if (showimei==viewimei)
{
ACTION 1
}
else
{
ACTION 2
{

Assuming showimei is same as viewimei meaning the user is using the same smartphone with the application, Action 1 is supposed to happen. But it always goes to Action 2. How should I make this work?

assylias
  • 321,522
  • 82
  • 660
  • 783
  • Wild guess: this is Java and you should be [using `equals` to compare strings](http://stackoverflow.com/questions/513832/how-do-i-compare-strings-in-java). – assylias Oct 26 '13 at 16:24

0 Answers0