79221931

Date: 2024-11-25 06:49:04
Score: 1
Natty:
Report link

On Android 11 and above use to add query in manifest also

  code   

 
fun openDialer(context: Context, phoneNum: String) {
    val intent = Intent(Intent.ACTION_DIAL)
    intent.setData(Uri.parse("tel:$phoneNumber"))
    context.startActivity(intent)
}

This need to be added

<manifest>
    <queries>
        <!-- Specific intents you query for -->
        <intent>
            <action android:name="android.intent.action.DIAL" />
        </intent>
    </queries>
</manifest>
Reasons:
  • Contains signature (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: mani