How to read when i download that attachment my app need to recognize my custom extension file in android -
here, have image file have compressed zip file , change extension. , attaching zip file email , sending. later after download custom extension file, app need recognise, , read content in zip file. how handle these. provide basic idea step step process. , have seen, example in android device, if want open image file xyz.png or xyz.jpg, when click on images ask me open image file through, gallery or photos or flicker, or other app once or every time. show app in category. give me idea how achieve.
how create custom extension file, compress in zip file, attach email, , when dowmload attachment app need recognize custom extension file in android
try this, in androidmanifest.xml put lines in activity want use open attachment:
<activity android:name="com.my.package.mycoolactivity"> <intent-filter> <action android:name="android.intent.action.view" /> <action android:name="android.intent.action.edit" /> <category android:name="android.intent.category.default" /> <data android:mimetype="my/mimetype" android:path="*.*\\.my_extension" /> </intent-filter> </activity> then in activity:
@override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.my_layout); uri data = getintent().getdata(); if (data !=null) { /* whatever want uri*/ } }
Comments
Post a Comment