Android Question Prevent gifs from keyboard

Alexander Stolte

Expert
Licensed User
Longtime User
In my app it is not allowed to share gifs or other media content, only pictures. But the Swift Key keyboard has a "GIF" button where you can insert gifs, this will trigger the intent event. How can I prevent this?

Youtube handles it like this: if you select a gif, the url is inserted.
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
Nothing special.
You are right, I have tested it in a new project, there it works. It's probably my manifest code.
To share images with my app:
AddActivityText(Main,
<intent-filter>
   <action android:name="android.intent.action.SEND" />
   <category android:name="android.intent.category.DEFAULT" />
   <data android:mimeType="image/*" />
</intent-filter>)

To open a link with my app:
AddActivityText("main",
<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT"></category>
    <category android:name="android.intent.category.BROWSABLE"></category>
        
    <data android:scheme="http" android:host="share.XXX.net"/>
    <data android:scheme="https" android:host="share.XXX.net"/>
</intent-filter> )
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
ok this solve the problem:
B4X:
AddActivityText(Main,
<intent-filter>
   <action android:name="android.intent.action.SEND" />
   <category android:name="android.intent.category.DEFAULT" />
   <data android:mimeType="image/jpeg" />
   <data android:mimeType="image/png" />
</intent-filter>)
 
Upvote 0
Top