Use android code in netbeans project

0

I'm using netbeans 8.2 and the case is simple, I'm doing a multi-platform project, it runs as a service, because it's a music player that is controlled by a web service. When I take it to android, using this project as a dependency for an android studio application, when importing it I need to use an android command, the problem is that I can not find the correct "import". I'm in a java app class. The command is this:

  

getExternalFilesDir ()

This command would execute it if the current platform would be Android, and I'm entering this command in the database class. So, I would need the import to execute this command, do I need to add a library? and what import should I use? It's a simple question but I can not get the answer! I hope if someone can thank me!

PS: to verify if it is the android system, I check if the main activity class of my project exists

public static boolean isandroid() {
         try {
        Class.forName("sistema.main.mainactivity");
        return true;
    } catch(ClassNotFoundException e) {
        return false;
    }
    }
    
asked by Bernardo Harreguy 16.12.2017 в 21:24
source

0 answers