Android Question Calling office document viewer app

microbox

Active Member
Licensed User
Longtime User
Hi, I'm still learning on B4A, I need some advice on how to create an application that will view office docs called on b4a app. The following steps I think might be good(please correct me if I have it wrong).

1. Create an interface in B4A
2. Call another application (e.g office document viewer) using intent when user click on a button.
3. User select docs to open in a certain storage device.
4. After viewing files, user closes the called app and goes back to the main application/interface.

Please let me know how would you approach what I need for my app?

Thanks everybody,
microbox
 
Last edited:

microbox

Active Member
Licensed User
Longtime User
There are several file pickers available: https://www.b4x.com/android/forum/pages/results/?query=file dialog&page=1&prefix=1

Sending a general VIEW intent is simple. However you might get better results if you set the intent Type to application/doc (or a different mime type based on the file).
Thanks for replying Erel, I was able to open the other application in my B4a app(Polaris' Office) using this code StartActivity(pm.GetApplicationIntent("com.infraware.office.link"))..is there a way to know what available parameters I can use when calling this app. For example: I want to open a particular document/type or look in a particular folder in my code?
 
Upvote 0
Top