This is what I tried. (I am not using Dropbox API. )
I defined this 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:scheme="file" />
<data android:mimeType="*/*"/>
</intent-filter>
And in my app:
Intent intent = getIntent();
file_uri = intent.getData(); // Get a uri to the file that I double clicked on
ContentResolver cr = getContentResolver();
file_is = cr.openInputStream(file_uri);
file_os = cr.openOutputStream(file_uri);
And now I just read and write this file as if it is a local file.
It works 90% of the times :-) Occasionally, however, the file get reset and all data is gone :-(
Are Dropbox implementing contentprovider ? If so - any pointer to a ContentResolver example?
If not, then I guess I must use Dropbox API But then - how can I select a Dropbox file by double click?