Veticia / PiLauncherNext

This is a simple launcher supporting Android/Official Quest/SideQuest apps and games.
65 stars 11 forks source link

Unable to launch other apps #16

Open siskyn opened 10 months ago

siskyn commented 10 months ago

Launching apps from PI Launcher Next fades everything to black, then after a few seconds it loads the home enviroment again.

Device: Quest 2

The same thing happens with DreamGrid, so it's something in the common code. If I launch apps through Quest Launcher or the original Library, it works.

See here for a video: Unable to launch apps through PiLauncherNext

frootloop88 commented 10 months ago

same

porcoddiocanebastardo commented 10 months ago

Same problem with same device, quest normal launcher work normally and Dreamgrid, Pilauncher, Lightlauncher and Picozen have this problem. QuestAppLauncher don't have this problem, but grafically isn't good like the others.

siskyn commented 10 months ago

See here for details on this bug: https://communityforums.atmeta.com/t5/Get-Help/PTC-56-break-third-party-launchers-bug/td-p/1066959

As a side note, Lightning launcher does work and seems to be feature rich. https://github.com/threethan/LightningLauncher

ValentineShilov commented 10 months ago

See here for details on this bug: https://communityforums.atmeta.com/t5/Get-Help/PTC-56-break-third-party-launchers-bug/td-p/1066959

Now fixed in my PiLauncherNext fork: https://github.com/ValentineShilov/PiLauncherNG By using the app launch method similar to LightningLauncher VRPlatform.java

threethan commented 10 months ago

Developer of LightningLauncher here!

The issue is that, as of about v56, the Quest will aggressively try to open new activities in the same window/task regardless of intent flags. Opening a VR activity in a 2D task will not work; that's what's causing the issues mentioned here.

This can be worked around by closing the task with activity.finish(), waiting for the closing animation to complete, and then launching the new intent once the task and it's window are fully removed.

cgapk123 commented 9 months ago

Developer of LightningLauncher here!

The issue is that, as of about v56, the Quest will aggressively try to open new activities in the same window/task regardless of intent flags. Opening a VR activity in a 2D task will not work; that's what's causing the issues mentioned here.

This can be worked around by closing the task with activity.finish(), waiting for the closing animation to complete, and then launching the new intent once the task and it's window are fully removed.

Hi, how can I use lua code to implement this function? This is the delayed start code I wrote, but it has no effect and cannot start the Quest game.

function launchApp11(pkgName) local intent = PackageManager.getLaunchIntentForPackage(pkgName) if isMobile then if intent then intent.putExtra("uri", "vrshell://launch/") activity.startActivity(intent) else toast("Cannot start the application") end else local questIntent = Intent() questIntent:setAction("com.oculus.vrshell.MainActivity") questIntent:setPackage(pkgName) if questIntent:resolveActivity(PackageManager) then -- Close the current task activity.finish() -- Wait for the closing animation to complete Timer.schedule(function() -- Launch the new intent once the task and window are fully removed activity.startActivity(questIntent) end, 1000) elseif intent then -- Close the current task activity.finish() -- Wait for the closing animation to complete Timer.schedule(function() -- Launch the new intent once the task and window are fully removed activity.startActivity(intent) end, 1000) else os.execute("am start -n " .. pkgName .. "/com.unity3d.player.UnityPlayerActivity") end end end

-- Call this function elsewhere launchApp(com.beatgames.beatsaber)