I am trying to download a file and then when opening it start an activity to process it.
The extension is .ofx. Firstly my browser won't download the file, which I am assuming is because it doesn't recognise the extension. If I download the file on my PC and copy it to my tablet I still can't get it to open my app.
If I change the extension to .csv it works fine, but not if I leave it as .ofx.
Is ofx a reserved extension somehow. The code is shown below
<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:scheme="file"
android:mimeType="*/*"
android:pathPattern=".*\\.csv" />
<data
android:scheme="file"
android:mimeType="*/*"
android:pathPattern=".*\\.ofx" />
</intent-filter>
The two file schemes are just to show the differences, even with just the ofx one it doesn't work. Strangely though even though the file is an OFX formatted file, the getIntent().getType() returns text/comma-separated-values. The first few lines of the OFX file are as follows if that is relevant.
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?OFX OFXHEADER="200" VERSION="203" SECURITY="NONE" OLDFILEUID="NONE" NEWFILEUID="NONE"?>
<OFX>
<SIGNONMSGSRSV1>
<SONRS>
<STATUS>
<CODE>0</CODE>
<SEVERITY>INFO</SEVERITY>
</STATUS>
<DTSERVER>20140429093807.875[+1]</DTSERVER>
<LANGUAGE>ENG</LANGUAGE>
</SONRS>
</SIGNONMSGSRSV1>
Don't know what I am doing wrong, please help if you can.