From 2093bf6d943c2f2a4ff27a7b5fd1a246f21c61fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Fern=C3=A1ndez?= Date: Sun, 6 Jan 2019 18:13:33 +0100 Subject: [PATCH] use getIntent from luajit-launcher --- platform/android/llapp_main.lua | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/platform/android/llapp_main.lua b/platform/android/llapp_main.lua index 907f3bc91..e1fa9c255 100644 --- a/platform/android/llapp_main.lua +++ b/platform/android/llapp_main.lua @@ -10,25 +10,7 @@ ffi.cdef[[ ]] -- check uri of the intent that starts this application -local file = A.jni:context(A.app.activity.vm, function(JNI) - local uri = JNI:callObjectMethod( - JNI:callObjectMethod( - A.app.activity.clazz, - "getIntent", - "()Landroid/content/Intent;" - ), - "getData", - "()Landroid/net/Uri;" - ) - if uri ~= nil then - local path = JNI:callObjectMethod( - uri, - "getPath", - "()Ljava/lang/String;" - ) - return JNI:to_string(path) - end -end) +local file = A.getIntent() if file ~= nil then A.LOGI("intent file path " .. file)