我正在构建一个 android 应用程序,在该应用程序中,我使用以下代码拨打*123*1# 之类的 USSD 代码。
context.startActivity(new Intent("android.intent.action.CALL", Uri.parse("tel:*123*1" + Uri.encode("#"))).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
我面临的问题是我的应用程序正在关闭。请参阅以下日志:
03-06 17:49:33.404 4937-4937/**** D/ViewRootImpl: ViewPostImeInputStage processPointer 0
03-06 17:49:33.614 4937-4937/**** D/ViewRootImpl: ViewPostImeInputStage processPointer 1
03-06 17:49:33.654 4937-4937/**** D/USSDCode: *123*1#
--------- beginning of system
03-06 17:49:33.734 4937-4937/**** D/isAccessibility: false
03-06 17:49:33.734 4937-4937/**** D/isMyWise1: false
03-06 17:49:33.734 4937-4937/**** D/isMyWise3: Access
03-06 17:49:33.774 4937-4937/**** I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@e5b7389 time:17108783
03-06 17:49:35.464 4937-4937/**** V/ActivityThread: updateVisibility : ActivityRecord{81dd657 token=android.os.BinderProxy@e5b7389 {****/com.databacklibrary.SIMBalanceActivity}} show : true
03-06 17:49:38.124 4937-4937/**** D/isAccessibility: false
03-06 17:49:38.124 4937-4937/**** D/isMyWise1: false
03-06 17:49:38.124 4937-4937/**** D/isMyWise3: Access
03-06 17:49:38.194 4937-4937/**** I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@e5b7389 time:17113201
03-06 17:49:38.524 4937-4937/**** D/USSDCodeMsg: onAccessibilityEvent
03-06 17:49:38.524 4937-4937/**** E/Alert1: 32
03-06 17:49:38.524 4937-4937/**** E/Alert2: com.android.phone
03-06 17:49:38.524 4937-4937/**** E/Alert3: null
03-06 17:49:38.524 4937-4937/**** E/Alert4: android.app.ProgressDialog
03-06 17:49:38.524 4937-4937/**** E/Alert5: [USSD code running...]
03-06 17:49:38.764 4937-4937/**** V/ActivityThread: updateVisibility : ActivityRecord{81dd657 token=android.os.BinderProxy@e5b7389 {****/com.databacklibrary.SIMBalanceActivity}} show : true
03-06 17:49:40.384 4937-4937/**** D/USSDCodeMsg: onAccessibilityEvent
03-06 17:49:40.384 4937-4937/**** E/Alert1: 32
03-06 17:49:40.384 4937-4937/**** E/Alert2: com.android.phone
03-06 17:49:40.384 4937-4937/**** E/Alert3: null
03-06 17:49:40.384 4937-4937/**** E/Alert4: com.android.phone.MMIDialogActivity
03-06 17:49:40.384 4937-4937/**** E/Alert5: [Phone]
03-06 17:49:40.394 4937-4937/**** D/USSDCodeMsg: onAccessibilityEvent
03-06 17:49:40.394 4937-4937/**** E/Alert1: 32
03-06 17:49:40.394 4937-4937/**** E/Alert2: com.android.phone
03-06 17:49:40.394 4937-4937/**** E/Alert3: null
03-06 17:49:40.394 4937-4937/**** E/Alert4: android.app.AlertDialog
03-06 17:49:40.394 4937-4937/**** E/Alert5: [Connection problem or invalid MMI code., OK]
03-06 17:49:40.404 4937-4937/**** D/isAccessibility: false
03-06 17:49:40.404 4937-4937/**** D/isMyWise1: false
03-06 17:49:40.404 4937-4937/**** D/isMyWise3: Access
03-06 17:49:40.444 4937-4937/**** I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@e5b7389 time:17115454
03-06 17:49:40.544 4937-4937/**** D/ViewRootImpl: ViewPostImeInputStage processKey 0
03-06 17:49:40.544 4937-4937/**** D/ViewRootImpl: ViewPostImeInputStage processKey 1
03-06 17:49:41.254 4937-4937/**** D/ViewRootImpl: #3 mView = null