mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-06 12:00:17 +02:00
"Shared from FBReader" text + message subject when sharing a book
This commit is contained in:
parent
564fcf8438
commit
a907bd4ac1
3 changed files with 13 additions and 2 deletions
6
TODO.1.5
6
TODO.1.5
|
@ -6,8 +6,10 @@ litres: top/hot lists (what's happen?)
|
||||||
litres: author photos
|
litres: author photos
|
||||||
|
|
||||||
* Screen orientation by default: not selected?
|
* Screen orientation by default: not selected?
|
||||||
* Old style seekbar for navigation
|
DONE Old style seekbar for navigation
|
||||||
* "Shared by FBReader" in message with shared book
|
* Start position mark in navigation widget
|
||||||
|
DONE "Shared from FBReader" in message with shared book
|
||||||
|
* Better file name for shared file
|
||||||
* Link sharing
|
* Link sharing
|
||||||
* fb2 native: footnote id depth
|
* fb2 native: footnote id depth
|
||||||
* check new condition syntax
|
* check new condition syntax
|
||||||
|
|
|
@ -226,6 +226,9 @@
|
||||||
<node name="bookmarkCreated" value="Bookmark created: %s"/>
|
<node name="bookmarkCreated" value="Bookmark created: %s"/>
|
||||||
<node name="clearSelection" value="Clear"/>
|
<node name="clearSelection" value="Clear"/>
|
||||||
</node>
|
</node>
|
||||||
|
<node name="sharing">
|
||||||
|
<node name="sharedFrom" value="Shared from <a href="http://www.fbreader.org/">FBReader</a>"/>
|
||||||
|
</node>
|
||||||
<node name="menu">
|
<node name="menu">
|
||||||
<node name="preferences" value="Settings"/>
|
<node name="preferences" value="Settings"/>
|
||||||
<node name="bookInfo" value="Book info"/>
|
<node name="bookInfo" value="Book info"/>
|
||||||
|
|
|
@ -23,8 +23,10 @@ import android.app.Activity;
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
import android.text.Html;
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.core.filesystem.ZLPhysicalFile;
|
import org.geometerplus.zlibrary.core.filesystem.ZLPhysicalFile;
|
||||||
|
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||||
|
|
||||||
import org.geometerplus.fbreader.library.Book;
|
import org.geometerplus.fbreader.library.Book;
|
||||||
import org.geometerplus.fbreader.filetype.FileTypeCollection;
|
import org.geometerplus.fbreader.filetype.FileTypeCollection;
|
||||||
|
@ -37,9 +39,13 @@ public abstract class FBUtil {
|
||||||
// That should be impossible
|
// That should be impossible
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
final CharSequence sharedFrom =
|
||||||
|
Html.fromHtml(ZLResource.resource("sharing").getResource("sharedFrom").getValue());
|
||||||
activity.startActivity(
|
activity.startActivity(
|
||||||
new Intent(Intent.ACTION_SEND)
|
new Intent(Intent.ACTION_SEND)
|
||||||
.setType(FileTypeCollection.Instance.simplifiedMimeType(file).Name)
|
.setType(FileTypeCollection.Instance.simplifiedMimeType(file).Name)
|
||||||
|
.putExtra(Intent.EXTRA_SUBJECT, book.getTitle())
|
||||||
|
.putExtra(Intent.EXTRA_TEXT, sharedFrom)
|
||||||
.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file.javaFile()))
|
.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file.javaFile()))
|
||||||
);
|
);
|
||||||
} catch (ActivityNotFoundException e) {
|
} catch (ActivityNotFoundException e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue