javaandroidjavafxjavafxportsgluon-mobile

Remove gluon-mobile dialog at startup


Am new to Android App Development using javafx (using javafxports & gluon-mobile) .
Am I using gluon-Api to build my project by extending MobileApplication class .
Using the sample programs.Am trying to make my own version.
But,at the starting of the starting of the App Am getting this unwanted dialog.

Am talking about this dialog that keeps appearing at the Startup of the App.

Am talking about the dialog

Here's my Code. I have extended the MobileApplication class to create my own version of App based on the samples.

    package com.gluonapplication;

    import com.gluonapplication.views.Home;
    import com.gluonhq.charm.glisten.application.MobileApplication;
    import static com.gluonhq.charm.glisten.application.MobileApplication.HOME_VIEW;

    /**
     *
     * @author Guru
     */
     public class MainApplication extends MobileApplication {

     public void init()
     {
      addViewFactory(HOME_VIEW,() -> new Home(HOME_VIEW).getView());


     }

     public void postinit()
     {

     }

     public void start()
     {

     }
     }

And here's the Home class that returns the home view for the App.

package com.gluonapplication.views;

    import com.gluonhq.charm.glisten.mvc.View;
    import java.io.IOException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javafx.fxml.FXMLLoader;

    /**
     *
     * @author Guru
     */
    public class Home {
    View view; 
    String name;
    public Home(String name)
    {
    this.name=name;
    }


    public  View  getView()
    {
    try 
    {
        view=FXMLLoader.load(Home.class.getResource("HomeView.fxml"));

       view.setName(name);
    } 
    catch (IOException ex) 
     {
       Logger.getLogger(Home.class.getName()).log(Level.SEVERE, null, ex);
       ex.printStackTrace();
       return new View(name);
      }
      return view;
      }
      }

Here's HomeView.fxml file whose Root is View .

    <?xml version="1.0" encoding="UTF-8"?>

    <?import com.gluonhq.charm.glisten.mvc.View?>
    <?import com.jfoenix.controls.JFXButton?>
    <?import javafx.scene.control.Label?>
    <?import javafx.scene.image.ImageView?> 
    <?import javafx.scene.layout.AnchorPane?>
    <?import javafx.scene.layout.BorderPane?>
    <?import javafx.scene.layout.VBox?>
    <View prefHeight="600.0" prefWidth="350.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1">
    <center>
    < VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" spacing="15" BorderPane.alignment="CENTER">
     <children>
        <Label text="Welcome Back!" />
        <AnchorPane prefHeight="254.0" prefWidth="253.0">
           <children>
              <ImageView fitHeight="254.0" fitWidth="234.0" layoutX="56.0" pickOnBounds="true" preserveRatio="true">

          </ImageView>
           </children>
        </AnchorPane>
        <JFXButton text="Continue" />
     </children>
  </VBox>

Thanks in Advance,Please help me stop this Dialog from Appearing!


Solution

  • The Gluon Mobile library that you are using in your project is not an open source library.

    You can find all the info about it here.

    While you can fully try the library (100% functionality) for free, you will have this nag window showing up at startup time.

    You can get rid of it by purchasing a license, or if it is an open source project or you are a student.