Hey, I was wondering if someone could give me some advice on opening a file with an external app. An example would be programming a file explorer which would open a text file in an external text editor.
Putting aside for now the question of whether it’s wise to create a file explorer in Corona, this is going to be OS-specific. You could use a URL scheme. Or pay for Pro and use the iOS sharing panel (added two weeks ago) or Android sharing via native.showPopup(). Be warned that Corona’s aforementioned sharing is broken for Android/Facebook, iPads, and iOS/Instagram, but it may work for your purposes:
Check the forum archives for more on both.
He, thanks for the fast response! I don’t really think this is what I am looking for, though. You are talking about sharing, which is not what I am trying to do. The dialogue I am looking for is similar in appearance, but I want to pull up an “Open with” dialogue box. Is there any API I can use for this?
The Android sharing panel can be used to open items in Drive, share via Bluetooth, share via Android Beam, save to Keep, and any text editors that have registered themselves with the OS in a way that’s compatible with Corona’s implementation. The iOS sharing panel can be used to open items in Pocket, Print, and any text editors that have registered themselves with the OS in a way that’s compatible with Corona’s implementation.
Not sure if this is helpful, of course.
PS: There is also a quasi-documented way on Android to detect what apps are installed; this is also in the forum archives.
I checked out the forum post you were talking about. It my be somewhat helpful, but as of yet, it isn’t going to accomplish exactly what I want. I am sure I will work something out though. If you would like I could post my workaround here when I have it operational.
Putting aside for now the question of whether it’s wise to create a file explorer in Corona, this is going to be OS-specific. You could use a URL scheme. Or pay for Pro and use the iOS sharing panel (added two weeks ago) or Android sharing via native.showPopup(). Be warned that Corona’s aforementioned sharing is broken for Android/Facebook, iPads, and iOS/Instagram, but it may work for your purposes:
Check the forum archives for more on both.
He, thanks for the fast response! I don’t really think this is what I am looking for, though. You are talking about sharing, which is not what I am trying to do. The dialogue I am looking for is similar in appearance, but I want to pull up an “Open with” dialogue box. Is there any API I can use for this?
The Android sharing panel can be used to open items in Drive, share via Bluetooth, share via Android Beam, save to Keep, and any text editors that have registered themselves with the OS in a way that’s compatible with Corona’s implementation. The iOS sharing panel can be used to open items in Pocket, Print, and any text editors that have registered themselves with the OS in a way that’s compatible with Corona’s implementation.
Not sure if this is helpful, of course.
PS: There is also a quasi-documented way on Android to detect what apps are installed; this is also in the forum archives.
I checked out the forum post you were talking about. It my be somewhat helpful, but as of yet, it isn’t going to accomplish exactly what I want. I am sure I will work something out though. If you would like I could post my workaround here when I have it operational.