@Robert Flatt i have observed one thing please see once
see def __ init__() when kivy app start first time it is calling self.intent_handler(self.intent) so video file getting uri but after pause kivy app
when i have commented line no 10 it is detected .
activity.bind(on_new_intent=self.intent_handler) this is not calling self.intent_handler ,when i choose another file from file manager i am 100% sure some problem is here
class ShareRcv():
# Must be instantiated in App.build()
def __init__(self,text_callback=None,video_callback=None):
self.text_callback=text_callback
self.video_callback=video_callback
self.intent = mActivity.getIntent()
10 #self.intent_handler(self.intent)
activity.bind(on_new_intent=self.intent_handler)
def to_file(self,uri,MIME_type):
try:
file_path = SharedStorage().retrieveUri(uri)
self.video_callback(file_path,MIME_type)
except Exception as e:
print('ShareRcv.to_file() ' + str(e))
def intent_handler(self,intentx):
uri=None
intent= mActivity.getIntent()
uri = intent.getData()
print('======================%',uri)
#intent.getParcelableExtra(Intent.EXTRA_STREAM)
MIME_type = intent.getType()
self.to_file(uri, MIME_type)
#Thread(target=self.to_file, args=[uri,MIME_type],daemon=True).start()
print(uri)
# if Intent.ACTION_VIEW == intent.getAction():
# MIME_type = intent.getType()
# if MIME_type == "text/plain":
# text = intent.getStringExtra(Intent.EXTRA_TEXT)
# if text and self.text_callback:
# self.text_callback(text,MIME_type)
# elif MIME_type == "video/mp4":
# uri = Intent.getParcelableExtra(Intent.EXTRA_STREAM)
# if uri and self.video_callback:
# Thread(target=self.to_file, args=[uri,MIME_type],
# daemon=True).start()