mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-06 03:50:19 +02:00
external bookmarks/library call, VERSION => 1.7.8
This commit is contained in:
parent
3daf623aae
commit
a2af9c49ca
5 changed files with 35 additions and 12 deletions
|
@ -19,6 +19,7 @@
|
|||
|
||||
package org.geometerplus.android.fbreader;
|
||||
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Intent;
|
||||
|
||||
import org.geometerplus.fbreader.book.SerializerUtil;
|
||||
|
@ -36,8 +37,18 @@ class ShowBookmarksAction extends FBAndroidAction {
|
|||
|
||||
@Override
|
||||
protected void run(Object ... params) {
|
||||
final Intent intent =
|
||||
new Intent(BaseActivity.getApplicationContext(), BookmarksActivity.class);
|
||||
try {
|
||||
startBookmarksActivity(
|
||||
new Intent("android.fbreader.action.EXTERNAL_BOOKMARKS")
|
||||
);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
startBookmarksActivity(
|
||||
new Intent(BaseActivity.getApplicationContext(), BookmarksActivity.class)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private void startBookmarksActivity(Intent intent) {
|
||||
intent.putExtra(
|
||||
FBReader.BOOK_KEY, SerializerUtil.serialize(Reader.Model.Book)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue