question

geomanca avatar image
geomanca asked

Opening Kindle reader with Intent? (re: ActivityNotFoundException)

Hello! I've run into a bit of a snag while developing an app that is intended to be deployed to Fire tablets. My issue involves trying to get the Kindle reader to open .mobi files. On most Android devices, the following code would either open a user's chosen ereader app, present them with a dialog to select such a reader, or throw an ActivityNotFoundException if no compatible reader exists: intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(uriPathToBook, "application/x-mobipocket-ebook"); startActivity(intent); When running the above code on the Fire, however, I get an ActivityNotFoundException. This doesn't seem to make sense, given that the stock reader definitely can open and read .mobi files. If I try to open a book from a file manager app, it opens without issue in the stock reader. So there must be something wrong with the intent in my app that is a problem for the Fire? Any tips are greatly appreciated!
fire tablet
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Nick Gardner avatar image
Nick Gardner answered
Hi geomanca, The behavior you are describing is not possible, as the Kindle reader does not implement the intent filter for mobi files.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.