Android Question Send photo Message

Theera

Well-Known Member
Licensed User
Longtime User
I 've studied send an MMS . I try to test code,but I don't know my error which I have done in manifest file.
 

Attachments

  • SendPhotoMessage.zip
    30.5 KB · Views: 50

GMan

Well-Known Member
Licensed User
Longtime User
Has this
B4X:
AddPermission("android.permission.SEND_MMS")
not to be like this (withut quotes) ?
B4X:
AddPermission(android.permission.SEND_MMS)
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
my Manifest file is belows
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="31"/>
<supports-screens android:largeScreens="true" 
    android:normalScreens="true" 
    android:smallScreens="true" 
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)
'End of default text.

AddPermission("android.permission.SEND_SMS")
AddPermission("android.permission.SEND_MMS")


AddActivityText(Main,
        <!--  Activity that allows  the user to send  new SMS/MMS messages-->
        <activity android:name=".ComposeSmsActivity">
                <intent-filter>
                    <action android:name="android.intent.action.SEND" />
                    <action android:name="android.intent.action.SENDTO" />
                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE" />
                    <data android:scheme="sms" />
                    <data android:scheme="smsto" />
                    <data android:scheme="mms" />
                    <data android:scheme="mmsto" />
                </intent-filter>
         </activity>)
 
Upvote 0

watesoft

Active Member
Licensed User
Longtime User
my Manifest file is belows
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="31"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)
'End of default text.

AddPermission("android.permission.SEND_SMS")
AddPermission("android.permission.SEND_MMS")


AddActivityText(Main,
        <!--  Activity that allows  the user to send  new SMS/MMS messages-->
        <activity android:name=".ComposeSmsActivity">
                <intent-filter>
                    <action android:name="android.intent.action.SEND" />
                    <action android:name="android.intent.action.SENDTO" />
                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE" />
                    <data android:scheme="sms" />
                    <data android:scheme="smsto" />
                    <data android:scheme="mms" />
                    <data android:scheme="mmsto" />
                </intent-filter>
         </activity>)
Starting from Android 7 (API 24) you cannot directly share file uris with other applications. You need to use FileProvider. You can see:
https://www.b4x.com/android/forum/t...yond-app-through-clipdata-item-geturi.108960/
https://www.b4x.com/android/forum/threads/class-fileprovider-share-files.97865/#content
 
Upvote 0
Top