Important: Please read the Qt Code of Conduct -

Qt Notification example, How to use it without making it the main activity in manifest?

  • I want to be able to use the notification example provided by Qt without having to declare it as the main activity in the manifest. Link to Qt notification example is Here

    I already have another activity that i am using as the main activity called "MyCustomAppActivity", its code is here:

    package org.qtproject.example.notification;
    import org.qtproject.example.notification.R;
    import org.qtproject.example.notification.MyCustomAppService;
    import org.qtproject.example.notification.NotificationClient;
    import android.content.Intent;
    import android.util.Log;
    import android.os.Bundle;
    public class MyCustomAppActivity extends QtActivity {
        public void onCreate(Bundle bundle) {
            Log.i("Activity", "Starting service!");
            Intent serviceIntent = new Intent(this, org.qtproject.example.notification.MyCustomAppService.class);

    Or if that is not possible, then I want to be able to launch the service from the notification class and I will no longer need "MyCustomAppActivity" class, and I will put the Qt notification class as the main activity in the manifest. How can I do that?

Log in to reply