Add Java class in Manifest

  • Hi!

    I want to add a Java class to my project. But the class does not work. In android studio project this code works.
    My Manifest:

    <manifest package="org.qtproject.example.TestPlayer" ~...~>
        <application android:name="" android:label="TestPlayer">
                      android:name="" ~...~>
                          <action android:name="android.intent.action.MAIN" />
                          <category android:name="android.intent.category.HOME" />
                          <category android:name="android.intent.category.LAUNCHER" />
                          <category android:name="android.intent.category.DEFAULT" />
    		<!-- My new class -->
                      <receiver android:name="">
                        <intent-filter >
                            <action android:name=
        <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

    My Java class:

    public class BootReceiver extends BroadcastReceiver {
        public void onReceive(Context context, Intent intent) {
            Log.d("TestPlayer", "onReceive");
            Intent myIntent = new Intent(context, QtActivity.class); // it is right?

    Java class in my project:

    In general, I want to make a kiosk mode on android. Maybe you know more elegant way?

  • I create template in Projects->Build Android APK. Here's what I got:

    I added the class BootReceiver to the folder src\org\qtproject\qt5\android\bindings. And it worked for me!

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.