Shell to App

tdocs2

Well-Known Member
Licensed User
Longtime User
Greetings and thank you in advance for answering my question.

Is there a way from B4A code to give Android OS a filename, e.g., file1.csv, to start an app in the device that can handle this type of file? In the case of a csv file, if the device had Kingston Office, Documents to Go, or Quickoffice, any of these apps would be started and display a spreadsheet format.

I am familiar and have experimented with the phone.PackageManager (pm) and its features to "shell" to an external app. For example, I have started The Kingston Office as well as other apps by using its package name with pm.GetApplicationIntent. I do not know how to "pass" a filename as an extra to any of the apps referenced above.

I have looked in the B4A forum and have not found an answer.

Any and all help will be welcomed.
 

tdocs2

Well-Known Member
Licensed User
Longtime User
Using file name to shell to app

Thank you, Erel.

It works perfectly. I tried it on my S3 where it gave a choice since 2 apps could handle the intent and on a Visual Land Prestige 10 where it shelled directly to the app that opened the CSV.

Simplicity itself! The amazing power and versatility of B4A.

I hope others can benefit from this thread.

Best regards.

Sandy
 
Upvote 0
Top