mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-04-24 04:45:40 +02:00
DroidFish: Accept VIEW intent with mime type application/x-chess-fen.
This commit is contained in:
parent
b297eb1086
commit
c3bcb9656f
DroidFish
@ -32,6 +32,11 @@
|
|||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<data android:mimeType="application/x-chess-pgn" />
|
<data android:mimeType="application/x-chess-pgn" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<data android:mimeType="application/x-chess-fen" />
|
||||||
|
</intent-filter>
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.SEND" />
|
<action android:name="android.intent.action.SEND" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
@ -456,7 +456,8 @@ public class DroidFish extends Activity implements GUIInterface {
|
|||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
Uri data = intent.getData();
|
Uri data = intent.getData();
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
if (Intent.ACTION_SEND.equals(intent.getAction()) &&
|
if ((Intent.ACTION_SEND.equals(intent.getAction()) ||
|
||||||
|
Intent.ACTION_VIEW.equals(intent.getAction())) &&
|
||||||
("application/x-chess-pgn".equals(intent.getType()) ||
|
("application/x-chess-pgn".equals(intent.getType()) ||
|
||||||
"application/x-chess-fen".equals(intent.getType())))
|
"application/x-chess-fen".equals(intent.getType())))
|
||||||
pgnOrFen = intent.getStringExtra(Intent.EXTRA_TEXT);
|
pgnOrFen = intent.getStringExtra(Intent.EXTRA_TEXT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user