简体   繁体   English

Android studio 从 android 设备远程访问文件

[英]Android studio remotely access files from android device

Im new in android developing, just wondering if i could remotely access android files, like download and upload file to it?我是 android 开发的新手,只是想知道我是否可以远程访问 android 文件,比如下载和上传文件到它? like airdroid.像airdroid。 is their any opensource project that i could just integrate it to my project?他们有任何开源项目,我可以将它集成到我的项目中吗?

thank you in advance !!先感谢您 !!

Try learning about Java File IO/ NIO, which is part of the Java SE, which is independent from android dev.尝试了解 Java 文件 IO/NIO,它是 Java SE 的一部分,它独立于 android 开发。 Here's a link: https://www.baeldung.com/java-io这是一个链接: https://www.baeldung.com/java-io

     // reading from a file, and printing out its contents.
          String fName = "text_file.txt";
    // get the BufferedReader from the input stream of the file.
    try {
        BufferedReader bReader = new BufferedReader(new FileReader(fName));
        String line;
        while ((line = bReader.readLine()) != null) {
            System.out.println(line);
        }
        bReader.close();


    } catch (IOException ioe) {
        ioe.printStackTrace();
    }


}

} }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM