【发布时间】:2013-07-17 07:05:23
【问题描述】:
我尝试了以下方法,但没有得到想要的输出。请帮忙。
public class LCD_Test extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setContentView(R.layout.activity_lcd__test);
Intent callIntent = new Intent(Intent.ACTION_DIAL);
// String imei_encode=Uri.encode("*#06#"); // encode this as *%2306%23*
String imei="*#06#";
callIntent.setData(Uri.parse("tel:"+(imei)));
// callIntent.setData(Uri.parse("tel:"+(imei_encode)));
//Error Invalid USSD code
startActivity(callIntent);
// Intent shortcutIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:"+Uri.encode("*#0*#")));
// startActivity(shortcutIntent);
}
}
【问题讨论】:
-
是的,但是在一条评论中写到它可能会被添加到姜饼中,所以我试图通过使用 JellyBean 的 API 来完成它。但是没有解决问题
-
@Blade0rz 和我尝试过的所有其他方法