Subprocess with android app
<p>I have made an application with Python and Kivy. Générated an apk file with buildozer.</p>

<p>In this application I generate *.xlsx files. I want to add a button to open directly the xlsx file with the google Sheets application.</p>

<p>But I don't know how I can do this. I know the suprocess system on python but how I can call the android application ?</p>

<p>I have search on google but I don't have find any information.</p>

<p>Have you got an idea ?</p>

<h2>Edit post with new code :</h2>

<p>Edit 2 : I have find the solution. I post the result code.</p>

<pre><code>## Call pyjnius for call intent
# Request the kivy activity instance
PythonActivity = autoclass('org.renpy.android.PythonActivity')
# Get the Android Intent class
Intent = autoclass('android.content.Intent')
## get the URI android
Uri = autoclass('android.net.Uri')
## Get the File object
File = autoclass('java.io.File')
## String object
String = autoclass('java.lang.String')

#create a new Android Intent
p__intent = Intent()
# Set the action of the intent
p__intent.setAction(Intent.ACTION_VIEW)
# Set the intent myme type file
p__intent.setDataAndType(Uri.fromFile(File(p__current_file_month)),String("application/vnd.ms-excel"))
## Set extra to put the filename
p__intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)

p__currentActivity = cast('android.app.Activity', PythonActivity.mActivity)
# Run the intent activity 
p__currentActivity.startActivity(p__intent)
</code></pre>

<p>This code open correctly the *.xlsx file.</p>

<p>Many thanks in advance</p>