Closed cgapk123 closed 4 months ago
You can open the android or Quest settings from Lightning Launcher. Code directly related to app launching is in Launch.java.
I'm very sorry, but I still don't understand how to open the system settings using a new window. This is how my previous code opens the system settings, but it only opens in the original program page, not in a new phone window using the Quest device.
My Quest system is v68
local intentSettings = Intent() intentSettings.setPackage("com.android.settings") intentSettings.addCategory(Intent.CATEGORY_LAUNCHER)
-- Add the following flags to try opening in a new window intentSettings.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) intentSettings.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK) intentSettings.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
-- Use pcall to catch possible errors local success, err = pcall(function() activity.startActivity(intentSettings) end)
if not success then print("Failed to start settings: " .. tostring(err)) end
Can you tell me where the code is to open it in a new window?
I need to view the system settings. Use the code that opens in a new window.