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