相关疑难解决方法(0)

在系统应用中使用sendBroadcast

我无法Broadcast从一个应用程序中发送一个自定义ROM作为系统应用程序加载(android:sharedUserId="android.uid.system"在中使用Manifest).

我遇到的问题是在尝试执行简单的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);
Run Code Online (Sandbox Code Playgroud)

我在Logcat中收到此警告:

Calling a method in the system process without a qualified user

这是ContextImpl.java在这个warnIfCallingFromSystemProcess()过程中被抽出来的.

有人知道为什么(如果我需要"修复"它)?

android

14
推荐指数
1
解决办法
2万
查看次数

标签 统计

android ×1