Exit App on Android


#1

Hey there, I am looking to close the App on Android via UX or Javascript.
I am aware of the fuse-homescreen possibility which unfortunately crashes on Android and I want to avoid.

Has anyone found an actual way to exit the Android App ? I have tried to create a .uno file with this method:

[Foreign(Language.Java)]
public static extern(Android) void ExitAppFinish()
@{
	android.app.Activity a = @(Activity.Package).@(Activity.Name).GetRootActivity();
	a.finish();
@}

But after many tries I have failed. Does anyone know how to make a UNO file with this and access it into Javascript ?


#2

Hello! I haven’t had any issues with fuse-homescreen crashing. Does this happen on some particular device/version?


#3

I figured it out, I had a problem with the fusepm package, after i un-installed it an re-installed it seems to work, though the package crashes the android simulator.