Manifest
のandroid:sharedUserId="android.uid.system"
を使用してシステムアプリとしてカスタムROMにロードされるアプリからBroadcast
を送信する際に問題が発生しました。システムアプリでsendBroadcastを使用する
シンプルsendBroadcastを実行しようとしたとき、私は取得しています問題は次のとおりです。
Intent newIntent = new Intent(intent.getExtras().getString(BUNDLE_ACTION_TO_REPLY_ON));
newIntent.putExtra(BUNDLE_FILE_URI, bitmapFile.getAbsolutePath());
newIntent.putExtra(BUNDLE_REPLY_WIDTH, width);
newIntent.putExtra(BUNDLE_REPLY_HEIGHT, height);
newIntent.putExtra(BUNDLE_REPLY_EXTRA, extra);
context.sendBroadcast(newIntent);
私はLogcatでこの警告取得しています:これはによって送り出されている
Calling a method in the system process without a qualified user
をwarnIfCallingFromSystemProcess()
プロセスにおけるContextImpl.java
。
なぜ誰かが知っていますか(そして私がそれを "修正"する必要がある場合)?
コンテキストを初期化する場所を表示できますか? – RvdK
ブロードキャストレシーバの一部として渡されます( 'public void onReceive(最終コンテキストコンテキスト、最終インテントインテント)') – Graeme
このBroadcastReceiverはシステムアプリケーションですか? – RvdK