My program is working absolutely fine from android 2.1 to android 2.3 But its not working on higher version of android. It does not give any exception when the app is executed on a higher version than 2.3. When run on 2.3 or lower version the number is correctly dialed and imei or other query is executed properly but when the app is run on higher version only dialpad with the code opens but the number/code is not dialed I have used in my manifest file
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="18" />
And my MainActivity Class
public class Motorola extends Activity implements OnClickListener{
TextView tvm1,tvm2,tvm3;
Intent myIntent;
String m=Uri.encode("#");
String str;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.motorola);
tvm1=(TextView) findViewById(R.id.tvmo1);
tvm2=(TextView) findViewById(R.id.tvmo3);
tvm3=(TextView) findViewById(R.id.tvmo2);
AdView adv3=(AdView) findViewById(R.id.ad4);
adv3.loadAd(new AdRequest());
tvm1.setOnClickListener(this);
tvm2.setOnClickListener(this);
tvm3.setOnClickListener(this);
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
/* *#06#:DISPLSYS IMEI NUMBER.
*#*#4636#*#*:DISPLAY INFORMATION ABOUT PHONE, BATTERY AND USAGE STATISTICS.
##7764726:MOTOROLA DROID HIDDEN SERVICE MENU. THE DEFAULT SPC PASSWORD IS SIX ZEROES (000000).*/
switch(v.getId())
{
case R.id.tvmo1:
str="*"+m+"06"+m;
myIntent=new Intent(Intent.ACTION_DIAL);
myIntent.setData(Uri.parse("tel:"+str));
startActivityForResult(myIntent,1);
break;
case R.id.tvmo2:
str="*"+m+"*"+m+"4636"+m+"*"+m+"*";
myIntent=new Intent(Intent.ACTION_DIAL);
myIntent.setData(Uri.parse("tel:"+str));
startActivityForResult(myIntent,1);
break;
case R.id.tvmo3:
str=m+m+7764726;
myIntent=new Intent(Intent.ACTION_DIAL);
myIntent.setData(Uri.parse("tel:"+str));
startActivityForResult(myIntent,1);
break;
}
}
}