更新时间:2023-11-18 23:39:16
PhoneNumber)
startActivity(i)
}
private fun addContact(Name:String,Number:字符串){
val intent = Intent(Intent.ACTION_INSERT)
intent.type = ContactsContract.Contacts.CONTENT_TYPE
intent.putExtra(ContactsContract.Intents.Insert.NAME,Name )
intent.putExtra(ContactsContract.Intents.Insert.PHONE,Number)
startActivity(intent)
}
私人乐趣sendMessage(Message:String){
val intent = Intent(Intent.ACTION_SEND)
intent.type =text / plain
intent.putExtra(Intent.EXTRA_TEXT,Message )
startActivity(意图)
}
私人乐趣openAppSetting(){
val intent =意图(设置) .ACTION_APPLICATION_DETAILS_SETTINGS)
intent.data = Uri.fromParts(Package,packageName,null)
startActivity(intent)
}
}
PhoneNumber") startActivity(i) } private fun addContact(Name : String,Number:String){ val intent = Intent(Intent.ACTION_INSERT) intent.type = ContactsContract.Contacts.CONTENT_TYPE intent.putExtra(ContactsContract.Intents.Insert.NAME , Name) intent.putExtra(ContactsContract.Intents.Insert.PHONE , Number) startActivity(intent) } private fun sendMessage(Message : String){ val intent = Intent(Intent.ACTION_SEND) intent.type = "text/plain" intent.putExtra(Intent.EXTRA_TEXT,Message) startActivity(intent) } private fun openAppSetting(){ val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS) intent.data = Uri.fromParts("Package",packageName,null) startActivity(intent) } }
这里有清单:
And here is manifest :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.mjk.thefirst">
<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".IntentActivity" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.scytec.datamobile.vd.gui.android.AppPreferenceActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
请帮助...
我尝试了什么:
我试过将此解析为清单文件:
Please Help...
What I have tried:
I tried to solve this to manifest file:
<intent-filter>
<action android:name="com.scytec.datamobile.vd.gui.android.AppPreferenceActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
但是我没有工作
but I didn't work