0

I have written a save text encryption tool in Java, which i want to run and share on Android, But i have problems at implementing a File Chooser Dialogue in Android. So how to convert this:

int rueckgabeWert=0;
JFileChooser chooser = new JFileChooser();
rueckgabeWert = chooser.showOpenDialog(null);
if(rueckgabeWert == JFileChooser.APPROVE_OPTION)
{
    JOptionPane.showMessageDialog(rootPane, "Successfully loaded");
}
else{
    JOptionPane.showMessageDialog(rootPane, "No file selected");
    chooser.cancelSelection();
}
rueckgabeWert=0;
FileReader f=new FileReader(chooser.getSelectedFile().getPath());
BufferedReader r =new BufferedReader(f);

Into Something which is usable in an .apk or does anyone have another suggestoin on how to get it to work on Android and make it easily shareable (one File)?

For full Source Code: http://pastebin.com/QFhvRtaq

  • You just want to select the file to open? There are a lot of libraries that can accomplish this: https://android-arsenal.com/tag/35 – se_bastiaan Oct 30 '16 at 18:41
  • @se_bastiaan Thanks alot, i will use https://android-arsenal.com/details/1/4571 out of your list – Lumberjack Dec 04 '16 at 08:36

0 Answers0