0
uri = "https://www.google.com/maps/dir/?api=1&travelmode=driving&origin=50.291793,30.355700&destination=50.400024,30.623489"
local Intent = luajava.newInstance("android.content.Intent")
local Uri = luajava.bindClass("android.net.Uri")

Intent:setAction(Intent.ACTION_VIEW)
Intent:setData(Uri:parse(uri))

Intent:addFlags(bit32.bor(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT, Intent.FLAG_ACTIVITY_NEW_TASK, Intent.FLAG_ACTIVITY_MULTIPLE_TASK))

bundle = Rect(0, 0, 200, 200)

activity:startActivity(Intent, bundle)`

I need to call [Rect][1] to define bundle for multi window mode in Android. This code is incorrect: bundle = Rect(0, 0, 200, 200) - the Rect function does not exist in Lua.

How can I do that?

https://developer.android.com/reference/android/graphics/Rect

WANDEL
  • 1
  • 3

0 Answers0