Android Question Intent for importing vcf files

rboeck

Well-Known Member
Licensed User
Longtime User
Hi,

for an app, which should have the ability, to import vcf files, i am searching the right intent to react for downloaded vcf files on an android device.
I have a log file, where i can find the the download file, my device reacts after downloading and shows all apps, who are able to use the vcf file.

B4X:
GeckoAppShell.showAlertNotification
- image = 'drawable://alert_download'
- title = 'eintrag-1.vcf'
- text = 'Download gestartet'
- cookie = ''
- name = 'download:///storage/emulated/0/Download/eintrag-1.vcf'
START u0 {act=android.intent.action.VIEW dat=file:///storage/emulated/0/Download/eintrag-1.vcf typ=text/x-vcard flg=0x4000000 cmp=android/com.android.internal.app.ResolverActivity} from pid 14841
Recording session end: P
GeckoAppShell.showAlertNotification
- image = 'drawable://alert_download'
- title = 'eintrag-1.vcf'
- text = 'Download abgeschlossen'
- cookie = ''
- name = 'download:///storage/emulated/0/Download/eintrag-1.vcf'
Recording session done: 1379156628480

Which intent do i have to define, to list my app inside this list?
 

NJDude

Expert
Licensed User
Longtime User
Then you will have to add your app to the list of available apps, like this:
B4X:
AddActivityText(<YOUR_ACTIVITY_HANDLING_THE_IMPORT>,
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/x-vcard" />
</intent-filter>)
Add the above lines to your Manifest.
 
Last edited:
Upvote 0
Top