Post Reply

Playing with Otter Intents and Book Shortcuts

OP izomiac

4th February 2012, 08:05 AM   |  #1  
OP Junior Member
Thanks Meter: 11
21 posts
Join Date:Joined: Sep 2010
Unlike most, I've found myself actually liking the content-oriented otter launcher on stock. But, being a geek, I'm never satisfied so I was playing around with GoLauncher and ADW to see if I could get the best of both worlds. This is what I've uncovered so far.

To launch a specific part of Otter, such as the book library, you need to send the following type of intent:
Category: android.intent.category.HOME
The valid actions are:
If you want to open a specific book, then you send an intent like this:
Action: android.intent.action.VIEW
Data: kindle://book/?action=open&book_id=AMZNID0%2FB002WB0XW0%2F0%2F
All that you want to change in that data string is the escaped book_id field. '%2F' just means '/', so you can see it's really just 'AMZNID0/(Book ID)/0/'. You can extract the book's ID from any Amazon Kindle product page (go to Manage your Kindle on So, the book ID in this example is: B002WB0XW0 and the URL of the product page is (plus some useless SEO keywords and tracking cruft I omitted).

Launching documents is very similar, but I assume each document's id is user specific. To see what it is, fire-up logcat ("adb logcat ActivityManager:D *:S") and look for a message like this:
D/ActivityManager( 1452): Starting: Intent { act=android.intent.action.VIEW dat=
4%2F flg=0x10000000 } from pid 3749
As for how to launch intents, several launchers let you do this. Sadly, Amazon gutted Settings.apk, so we're left with no provider for android.intent.action.pick_activity (ditto for shortcuts and folders). Therefore, we need an app like QCustomShortcut that will allow us to construct a custom intent shortcut, then directly add the icon to the launcher without going through the activities or shortcut menus. Sadly, that's not listed as compatible with the Fire, so you have to install it on another Android device and sideload the APK (which is kept under /mnt/asec, not /data/app, BTW).

In the end, I decided to return to Otter, but figured I could save someone a bit of trouble or hopefully even spark some ideas by posting this. It's all pretty basic stuff, but finding/launching intents and what-not took me a bit to sort through this evening so I suppose there may be others on this neophytic ledge between being a newb and a guru that I keep finding myself on.
The Following 6 Users Say Thank You to izomiac For This Useful Post: [ View ]
26th April 2012, 11:48 AM   |  #2  
Junior Member
Thanks Meter: 0
1 posts
Join Date:Joined: Apr 2012
Hi izomiac,

I'm interested in what you said. I'm creating an android that can open any kind of documents, including ebooks.

Unfortunately I could not see the kind of information you show in my logcat.

You said :

Launching documents is very similar, but I assume each document's id is user specific.

Could you give me an example to how open an ebook not downloaded by the amazon kindle app?

Really thank you for your post, it helps me a lot.
29th April 2012, 04:44 AM   |  #3  
OP Junior Member
Thanks Meter: 11
21 posts
Join Date:Joined: Sep 2010
I don't think the Kindle app can directly open Documents/Books that haven't been downloaded. When I just tried that the Kindle App (for ICS) stayed on the splash screen and never loaded anything. I suspect Amazon uses some sort of push service rather than an intent to start an automatic download.

For logcat, what I did was run the logcat command using ADB, then launch the document I wanted to see the ID for on the Kindle using the stock launcher.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes