简体   繁体   中英

Register an app to show in 'complete action using dialog in Android

How can I include my application in this complete action option?

在此输入图像描述

Got the solution, try the below code:

<Activity>

        <intent-filter>
            <action android:name="android.intent.action.CALL_PRIVILEGED" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:scheme="tel" />
        </intent-filter>
</Activity>


<uses-permission android:name="android.permission.CALL_PRIVILEGED" />

These options list all the apps that have an Activity registered to handle to 'call' Intent. If you want your app to appear, you'll have to create an Activity and register it for that Intent.

To do that you'll need to add a permission in your manifest

<uses-permission android:name="android.permission.CALL_PHONE" />

And add this intent filter to your activity in your manifest

<intent-filter>
 <action android:name="android.intent.action.CALL_BUTTON" />
 <category android:name="android.intent.category.DEFAULT" />
</intent-filter>

To call directly escaping the dialer, try this:

Intent call = new Intent(Intent.ACTION_CALL);
call.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
call.setData(Uri.parse("tel:" + number));
startActivity(call);

Sorry I misunderstood your question. I have not tried it but I hope these two intent filter can help you:

<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM