[Interest] How to shutdown Qt app on Android.

Robert Iakobashvili coroberti at gmail.com
Tue Jan 27 11:18:56 CET 2015


Dear Igor,

1. Arrange forceClosingMyApp in your derived activity:

package com.myComp.MyProduct.activity;

import java.lang.String;
import android.os.Bundle;
import android.util.Log;
import android.content.Intent;
import android.app.Activity;
import android.view.KeyEvent;

import org.qtproject.qt5.android.bindings.QtActivity;

public class MyActivity extends org.qtproject.qt5.android.bindings.QtActivity
{
private static final String TAG = "MyActivity";
private static MyActivity m_MyActivityInstance = null;

public static MyActivity getMyActivityInstance()
{
    return MyActivity.m_MyActivityInstance;
}
};


public static void forceClosingMyActivity()
{
    //Log.v(TAG, "forceClosingMyActivity - entered");


    m_GhotitActivityInstance.finish();

}
Regards,
Robert


On Mon, Jan 26, 2015 at 8:24 AM, Igor Mironchik
<igor.mironchik at gmail.com> wrote:
> Hi.
>
> How to completely shutdown Qt app on Adnroid when "Home" button pressed?
>
> I want to say when user presses "Home" button app will continue to work in
> background, i.e. the app shown in the list of apps when long touch "Home"
> button.
>
> How to prevent it and completely shutdown Qt app?
>
> Is it possible?
>
> --
> Best Regards,
> Igor Mironchik.
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list