为什么在推送到 priv-app 时无法识别 intent-filter 操作?

问题描述 投票:0回答:0

我正在开发一个系统应用程序(

system/priv-app/
)。当我向
AndroidManifest
中的一个活动添加一个新的意图过滤器操作并将新的apk推送到priv-app并尝试使用adb shell(也来自第三方应用程序)启动该活动时,我得到
Error: Activity not started, unable to resolve Intent { act=com.example.SETTINGS flg=0x10000000 }
。 将应用程序推送到 priv-app 后尝试重新启动。

清单

    <activity android:name=".ui.activity.AppSettingsActivity"
        android:launchMode="singleTop"
            android:exported="true">
            <meta-data android:name="distractionOptimized" android:value="true"/>
            <intent-filter>
                <action android:name="com.example.SETTINGS"/>
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
</activity>

使用以下 adb 命令启动该活动

adb shell am start -a com.example.SETTINGS

来自第三方应用程序

startActivity(new Intent("com.example.SETTINGS"));
android intentfilter android-automotive
© www.soinside.com 2019 - 2024. All rights reserved.