0

I am writing a javaFxPorts application that use more than one activity.

Inside the AndroidManifest the activity default location (for the org.javafxports.jfxmobile plugin) seem to be "javafxports.android.FXActivity". so naturally it can't be used twice.

is there any way to add another activity with this plugin?

Rb87
  • 180
  • 1
  • 9

1 Answers1

1

I don't see why you can't add more than one activity to the same application.

See for instance the Devoxx application. The Android manifest contains several activities:

<application android:label="Devoxx" android:name="android.support.multidex.MultiDexApplication" android:icon="@mipmap/ic_launcher">
    ...
    <activity android:name="javafxports.android.FXActivity"
              android:label="Devoxx"
              android:launchMode="singleTop"
              android:screenOrientation="portrait"
              android:configChanges="screenSize">
        ...
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>

    <activity android:name="com.gluonhq.impl.charm.down.plugins.android.NotificationActivity"
              android:parentActivityName="javafxports.android.FXActivity">
        <meta-data android:name="android.support.PARENT_ACTIVITY"
                   android:value="javafxports.android.FXActivity"/>
    </activity>
    ...
</application>

These are intended to work with the Charm Down plugins (Permissions, PushNotifications, LocalNotifications, Barcode Scanner), that have defined several specific activities.

José Pereda
  • 44,311
  • 7
  • 104
  • 132
  • Thank u so much for your answer. i'v looked in to the Devoxx exemple and others like it. I am trying to understand Charm Down better. i have rewritten my question (https://stackoverflow.com/questions/51867360/javafxports-lunching-a-second-javafx-from-a-service) since more specifecly i am trying to lunch a second activety wtich is a javaFx application in it self (as appose to push notification or premission). hope you can check it out, i greatly appreciate your help! – Rb87 Aug 15 '18 at 22:48