This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Context context = view.getContext(); | |
| ContentResolver cr = context.getContentResolver(); | |
| ContentValues values; | |
| try { | |
| // create a file for test | |
| File file = new File(context.getFilesDir(), "1234568"); | |
| file.createNewFile(); | |
| try (OutputStream os = new FileOutputStream(file)) { | |
| os.write("test".getBytes()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # THIS SCRIPT IS FOR A STANDALONE TOOLCHAIN!! | |
| # For more information please consult https://z3ntu.github.io/2015/12/12/Cross-compiling-native-linux-applications-for-android.html | |
| # Don't forget to adjust this to your standalone toolchain path | |
| export TOOLCHAIN_PATH=$HOME/Android/standalone-toolchain/ | |
| # This is just an empty directory where I want the built objects to be installed | |
| export PREFIX=$HOME/Android/out/prefix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # I put all my dev stuff in here | |
| export DEV_PREFIX=$HOME/Dev/ | |
| # Don't forget to adjust this to your NDK path | |
| export ANDROID_NDK=${DEV_PREFIX}/android-ndk-r8d/ | |
| export CROSS_COMPILE=arm-linux-androideabi |