Fix attachments, at least for the one phone I've tested on. Requires

K-9 mail (Gmail doesn't allow opening attachments).  Trick was to drop
the file extension, since if present that seems to come ahead of mime
type for filtering.
This commit is contained in:
Eric House 2012-12-03 23:10:31 -08:00
parent 922f4a22f4
commit ac8c229e75
3 changed files with 8 additions and 10 deletions

View file

@ -134,14 +134,12 @@
/>
</intent-filter>
<!-- <intent-filter> -->
<!-- <action android:name="android.intent.action.VIEW" /> -->
<!-- <category android:name="android.intent.category.DEFAULT" /> -->
<!-- <category android:name="android.intent.category.BROWSABLE" /> -->
<!-- <data android:mimeType="*/*" -->
<!-- android:scheme="content" -->
<!-- /> -->
<!-- </intent-filter> -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:mimeType="@string/invite_mime" />
</intent-filter>
</activity>
<!-- downloading dicts -->

View file

@ -920,7 +920,7 @@ public class GameUtils {
byte[] data = json.toString().getBytes();
File file = new File( dir,
String.format("invite_%s.json", room ) );
String.format("invite_%s", room ) );
FileOutputStream fos = new FileOutputStream( file );
fos.write( data, 0, data.length );
fos.close();

View file

@ -32,7 +32,7 @@ public class XWApp extends Application {
public static final boolean BTSUPPORTED = false;
public static final boolean SMSSUPPORTED = true;
public static final boolean GCMSUPPORTED = true;
public static final boolean ATTACH_SUPPORTED = false;
public static final boolean ATTACH_SUPPORTED = true;
public static final boolean DEBUG = true; // DON'T SHIP THIS WAY
public static final String SMS_PUBLIC_HEADER = "-XW4";