threethan / LightningLauncher

App launcher for Oculus Quest and Android TV devices with a focus on speed and flexibility. Thanks for 80K sidequest downloads!
https://sidequestvr.com/app/21783
GNU General Public License v3.0
349 stars 24 forks source link

Can you tell me where the code is to open it in a new window? #146

Closed cgapk123 closed 4 months ago

cgapk123 commented 4 months ago

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.

threethan commented 4 months ago

You can open the android or Quest settings from Lightning Launcher. Code directly related to app launching is in Launch.java.

cgapk123 commented 3 months ago

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