Hi
On Fri, Jul 05, 2013 at 03:48:56PM -0700, Alexander Taylor wrote:
> I'd like to make my kivy app automatically open .sgf files - specifically,
> to appear in the 'Complete action using...' list that pops up when such a
> file is selected in a file manager or downloaded via a browser.
>
> It seems there are two steps to this. The first is to include a suitable
> intent-filter in AndroidManifest.xml. I'm trying:
>
> <intent-filter>
> <action android:name="android.intent.action.VIEW" />
> <category android:name="android.intent.category.DEFAULT" />
> <data android:pathPattern=".*sgf" /></intent-filter>
>
>
> My first question is, should this intent-filter be correct for my desired
> behaviour? I can't get it to work, but I don't know if that's because it's
> syntactically wrong or because I have a different error during apk
> compilation.
Seems fine to me. Did you see
http://python-for-android.readthedocs.org/en/latest/toolchain/#usage ?
the intent-filter option allows you to have your intent-filter packaged
with your app.
>
> The second question is, is there any mechanism within python-for-android to
> handle an existing program receiving arbitrary intents? It seems like it
> must in principle be possible, but I can't work out how or even if someone
> has tried to get tihs particular behaviour before. The ideal result (if I
> understand it correctly...) would be something like automatically starting
> the app (or opening a running instance) and calling App.on_intent(...) with
> some suitable arguments.
I believe currently the intent is checked on start on resume for a file
passed as parameter, maybe it's not enough, or not general enough
https://github.com/kivy/python-for-android/blob/master/src/src/org/renpy/android/SDLSurfaceView.java#L422
i didn't test this for a long time, not sure how mature it was,
improvements welcome :)
>
> --
> You received this message because you are subscribed to the Google Groups "Kivy users support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
kivy-users+...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>