G Gargoyle Member Licensed User Longtime User Aug 31, 2012 #1 Is it possible to register my program to be put in the list to 'Open with' for certain types of files. Also how would I get the filename that was to be opened? (from file explorer) I've searched for 'register' 'open with' 'arguments' and looked through loads of topics but didn't see anything. Any help is appreciated.
Is it possible to register my program to be put in the list to 'Open with' for certain types of files. Also how would I get the filename that was to be opened? (from file explorer) I've searched for 'register' 'open with' 'arguments' and looked through loads of topics but didn't see anything. Any help is appreciated.
NJDude Expert Licensed User Longtime User Aug 31, 2012 #2 You will have to add this to the app's Manifest: Code: Copy AddActivityText(Main, <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="image/*" /> </intent-filter>) The above example will register your app to open "images", change the Mime type accordingly. Upvote 0
You will have to add this to the app's Manifest: Code: Copy AddActivityText(Main, <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="image/*" /> </intent-filter>) The above example will register your app to open "images", change the Mime type accordingly.
G Gargoyle Member Licensed User Longtime User Aug 31, 2012 #3 Thanks NJDude, that worked great. Now, how can I know/get what file was to be passed to my app? Upvote 0
G Gargoyle Member Licensed User Longtime User Aug 31, 2012 #4 Found out how, by using an Intent defined variable, Activity.GetStartingIntent and GetExtra("ABSOLUTE_FILE_PATH") Upvote 0
Found out how, by using an Intent defined variable, Activity.GetStartingIntent and GetExtra("ABSOLUTE_FILE_PATH")
R Roger Garstang Well-Known Member Licensed User Longtime User Aug 31, 2012 #5 I was just looking for something like this. I zip up my projects and wanted a way to read/open/edit them on my phone. I found a file manager that opened the zip file but its editor was bad. Should be easy to make my own now and possibly even something to open the zip without the need for the file manager. Upvote 0
I was just looking for something like this. I zip up my projects and wanted a way to read/open/edit them on my phone. I found a file manager that opened the zip file but its editor was bad. Should be easy to make my own now and possibly even something to open the zip without the need for the file manager.
a_carignan Member Licensed User Longtime User Nov 18, 2012 #6 How How to retrieve the name of the directory and file for a commenade file open?:BangHead: Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Nov 19, 2012 #7 Check the "extras" that are included in the intent (Activity.GetStartingIntent). Upvote 0