English 中文(简体)
是否允许在APIC33中再作改动?
原标题:Did the permissions to launch another app change in API 33?

我只看到了第33号新闻稿。 是否有变化?

我有两点:A和B。 请打电话com.example.acom.example.b。 它们必须相互发射。 至2008年12月31日,在A组试图发射B时,我收到:

android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.b/com.example.b.DefaultLaunchActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>?

DefaultLaunchActivity is defined in app B s manifest like this:

<activity
    android:name="com.example.b.DefaultLaunchActivity"
    android:exported="true">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>

我在《意向书》中还补充了以下内容(参见第31段):

<queries>
    <package android:name="com.example.b" />
</queries>

最后,附录 a. 类似于B的发射:

val intent = application.packageManager.getLaunchIntentForPackage("com.example.b")?.apply {
    addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
    addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
    addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP)
}

Adding Intent.FLAG_ACTIVITY_REQUIRE_NON_BROWSER doesn t help. App B gets the same error when it tries to launch app A.

明确, 以上编码是关于APIC32的,但并非第55/233号。 发生了什么变化?

问题回答

Yes, many things have changed.

页: 1 如:

    <queries>
        <package android:name="com.google.android.apps.translate"/>
    </queries>

It was introduced in Android 11 (API 30). The observed behavior might be explained as it was introduced in API 30, but forced since API 33. Also others causes are possible. It will require more research to figure out a root cause.

Ref. docs:quest/a>

Ref. Android docs: Behavior changes: Apps targeting Android 11

update I noticed you already use queries attribute, so an issue cause lays somewhere else





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...