Hi again:
My new (but, I'm sure, not last) problem with my rooted T1 android ebook is: How could I associate a mime type to an existing android application?
If I'm right, in android it's not possible to call an application directly by code. Instead, we have to do an "intent" with a mime type.
Well, it usually works, but in my rooted T1 when I make this:
I don't get CoolReader (the book viewer for the sOrg fb2 file) in the app list ready to open "text/*" files. I've tried to change mime type to "*/*", and I get a lot of apps ready to open my book (none of them can do it, of course), but CoolReader isn't in that list.
So, I've read that the app (CoolReader) has to write his own manifest file, in order to be called by android, but CoolReader does it. If I try to execute a fb2 file with File Expert, installed in my T1, CoolReader is in the list of apps ready to open the book, but if I try to open with Root Explorer or with my B4A app, it is not. sOrg is right (for example, Jota Text Editor is in the list, and it opens the fb2 file).
I suposse it's a problem with permissions (I know, it's a rooted device, and may be some things doesn't work as we expect). :sign0148:
:sign0163: Do you know any other way in order to execute an installed App by code from B4A, or any way to make android executes just the app I want? Is it possible to create the "intent" as root? How? :BangHead:
I'm going to try to install Market and uninstall CoolReader and install it again from Market. I've installed from other way, and maybe it doesn't work well if it's not installed from official Market.
Thanks in advance. Any ideas will be welcomed!!!
My new (but, I'm sure, not last) problem with my rooted T1 android ebook is: How could I associate a mime type to an existing android application?
If I'm right, in android it's not possible to call an application directly by code. Instead, we have to do an "intent" with a mime type.
Well, it usually works, but in my rooted T1 when I make this:
B4X:
Try
inAct.Initialize(inAct.ACTION_VIEW, sOrg)
inAct.SetType("text/*")
StartActivity(inAct)
Catch
ToastMessageShow("I CAN'T OPEN THE BOOK: " & sOrg, True)
End Try
I don't get CoolReader (the book viewer for the sOrg fb2 file) in the app list ready to open "text/*" files. I've tried to change mime type to "*/*", and I get a lot of apps ready to open my book (none of them can do it, of course), but CoolReader isn't in that list.
So, I've read that the app (CoolReader) has to write his own manifest file, in order to be called by android, but CoolReader does it. If I try to execute a fb2 file with File Expert, installed in my T1, CoolReader is in the list of apps ready to open the book, but if I try to open with Root Explorer or with my B4A app, it is not. sOrg is right (for example, Jota Text Editor is in the list, and it opens the fb2 file).
I suposse it's a problem with permissions (I know, it's a rooted device, and may be some things doesn't work as we expect). :sign0148:
:sign0163: Do you know any other way in order to execute an installed App by code from B4A, or any way to make android executes just the app I want? Is it possible to create the "intent" as root? How? :BangHead:
I'm going to try to install Market and uninstall CoolReader and install it again from Market. I've installed from other way, and maybe it doesn't work well if it's not installed from official Market.
Thanks in advance. Any ideas will be welcomed!!!