intentfilter - Android intent-filter to be notified of an attempt to view a CSV file in the Download Manager -
what's required magic incantation register app notified user trying view csv file they've previously downloaded via download manager. i've had brief play , following filter happily intercept notifications generated by: dropbox, box, google drive, sky drive, chrome..... , offer open files, app isn't getting when user attempts view file via download manager.
<intent-filter> <action android:name="com.my.testimportapp.launch" /> <action android:name="android.intent.action.send" /> <action android:name="android.intent.action.view" /> <action android:name="android.intent.action.edit" /> <action android:name="android.intent.action.paste" /> <action android:name="android.intent.action.open_document" /> <action android:name="android.intent.action.get_content" /> <action android:name="android.intent.action.insert" /> <action android:name="android.intent.action.insert_or_edit" /> <action android:name="android.intent.action.sendto" /> <action android:name="android.intent.action.send_multiple" /> <action android:name="android.intent.action.pick" /> <category android:name="android.intent.category.category_browsable" /> <category android:name="android.intent.category.default" /> <category android:name="android.intent.category.launcher" /> <data android:scheme="http" /> <data android:scheme="https" /> <data android:scheme="ftp" /> <data android:scheme="file" /> <data android:scheme="data" /> <data android:scheme="info" /> <data android:scheme="data" /> <data android:scheme="smb" /> <data android:scheme="nfs" /> <data android:scheme="android.resource" /> <data android:mimetype="text/comma-separated-values"/> <data android:mimetype="text/csv"/> <data android:mimetype="text/plain"/> </intent-filter>
after bit of playing, following appears work:
<intent-filter> <action android:name="android.intent.action.send" /> <action android:name="android.intent.action.send_multiple" /> <action android:name="android.intent.action.view" /> <action android:name="android.intent.action.open_document" /> <action android:name="android.intent.action.pick" /> <category android:name="android.intent.category.browsable" /> <category android:name="android.intent.category.default" /> <category android:name="android.intent.category.launcher" /> <category android:name="android.intent.category.alternative" /> <data android:scheme="http" /> <data android:scheme="https" /> <data android:scheme="ftp" /> <data android:scheme="file" /> <data android:scheme="data" /> <data android:scheme="info" /> <data android:scheme="data" /> <data android:scheme="smb" /> <data android:scheme="nfs" /> <data android:mimetype="text/comma-separated-values"/> <data android:mimetype="text/csv"/> <data android:mimetype="text/plain"/> </intent-filter> <intent-filter> <action android:name="android.intent.action.send" /> <action android:name="android.intent.action.send_multiple" /> <action android:name="android.intent.action.view" /> <action android:name="android.intent.action.open_document" /> <action android:name="android.intent.action.pick" /> <category android:name="android.intent.category.browsable" /> <category android:name="android.intent.category.default" /> <category android:name="android.intent.category.launcher" /> <category android:name="android.intent.category.alternative" /> <data android:scheme="http" /> <data android:scheme="https" /> <data android:scheme="ftp" /> <data android:scheme="file" /> <data android:scheme="data" /> <data android:scheme="info" /> <data android:scheme="data" /> <data android:scheme="smb" /> <data android:scheme="nfs" /> <data android:host="*" /> <data android:pathpattern="/.*\\.csv" /> <data android:pathpattern="/.*\\.csv" /> <data android:pathpattern="/.*\\.txt" /> <data android:pathpattern="/.*\\.text" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.send" /> <action android:name="android.intent.action.send_multiple" /> <action android:name="android.intent.action.view" /> <action android:name="android.intent.action.open_document" /> <action android:name="android.intent.action.pick" /> <category android:name="android.intent.category.browsable" /> <category android:name="android.intent.category.default" /> <category android:name="android.intent.category.launcher" /> <category android:name="android.intent.category.alternative" /> <data android:mimetype="text/comma-separated-values"/> <data android:mimetype="text/csv"/> <data android:mimetype="text/plain"/> </intent-filter>
Comments
Post a Comment