gpt4 book ai didi

android 彩信显示错误?

转载 作者:行者123 更新时间:2023-11-30 02:55:43 25 4
gpt4 key购买 nike

    Intent sendIntent = new Intent(Intent.ACTION_SEND); 
sendIntent.setClassName("com.android.mms", "com.android.mms.ui.ComposeMessageActivity");
//sendIntent.setType("vnd.android-dir/mms-sms");
sendIntent.putExtra("exit_on_sent", true);
sendIntent.putExtra("address", number);
sendIntent.putExtra("sms_body", "my body");
File dir = new File("/sdcard/vm/");

String path=dir.getAbsolutePath()+"/abc.mp4";
File fl=new File(path);
if(fl.exists()){
System.out.println("file is exist");
}
Uri uri = Uri.fromFile(fl);
sendIntent.putExtra(Intent.EXTRA_STREAM, uri);
sendIntent.setType("video/*");
startActivityForResult(sendIntent, 1);

我正在使用这段代码,它在某些设备上工作,但在索尼手机和其他一些手机上显示错误

显示错误“Activity 类 {com.android.mms/com.android.mms.ui.ComposeMessageActivity} 您是否在 AndroidManifest.xml 中声明了此 Activity ?”

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.vinstantmessage"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="18" />

<supports-screens
android:largeScreens="false"
android:normalScreens="true"
android:smallScreens="false" />

<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.microphone" />

<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.STORAGE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />

<uses-feature android:name="android.hardware.camera.front" />
<uses-feature android:name="android.hardware.microphone" />

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

<uses-feature android:name="android.hardware.camera" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" >
</uses-permission>
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECORD_VIDEO" />

<uses-feature android:name="android.hardware.camera.autofocus" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.vinstantmessage.VM_SplashScreen"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<receiver
android:name="com.alarm.IncommingCallReceiver"
android:enabled="true" >
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
</intent-filter>
</receiver>
<receiver android:name="com.alarm.AlarmReciever" />












<activity android:name="com.android.mms.ui.ComposeMessageActivity" > </activity>


<activity
android:name="com.vinstantmessage.VM_Home"
android:label="@string/title_activity_vm__home"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.vinstantmessage.VM_RecordVideo"
android:label="@string/title_activity_vm__record_video"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.vinstantmessage.VM_EditVideo"
android:label="@string/title_activity_vm__edit_video"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.vinstantmessage.VM_Settings"
android:label="@string/title_activity_vm__settings"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.vinstantmessage.VM_ThumbNail"
android:label="@string/title_activity_vm__thumb_nail"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.vinstantmessage.VM_ShareVideo"
android:label="@string/title_activity_vm__share_video"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.vinstantmessage.VM_YourMessages"
android:label="@string/title_activity_vm__your_messages"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.vinstantmessage.VM_AssignedMessages"
android:label="@string/title_activity_vm__your_messages"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.vinstantmessage.VM_ScheduledMessages"
android:label="@string/title_activity_vm__your_messages"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.vinstantmessage.VM_DefaultMessage"
android:label="@string/title_activity_vm__your_messages"
android:screenOrientation="portrait" >
</activity>

<receiver
android:name="com.alarm.SMSReceiver"
android:enabled="true" >
<intent-filter android:priority="1000" >
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
<action android:name="android.provider.Telephony.SMS_SENT" />
</intent-filter>
</receiver>
</application>

</manifest>

最佳答案

我认为您必须在 AndroidManifest.xml 文件中声明 ComposeMessageActivity。

写下一行

<activity android:name="com.android.mms.ui.ComposeMessageActivity" > </activity> 

<application>标签。

关于android 彩信显示错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23290567/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com