Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 839 Bytes

Android.md

File metadata and controls

35 lines (25 loc) · 839 Bytes

Android generics

Common operations for Android apps. For Android libraries specific operations, check out Android-library.md

Add app permissions

  1. Open AndroidManifest.xml
  2. Add the <uses-permissions> tag to the root element (<manifest>) of the XML file.

E.g.:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.domain.package">

    <uses-permission android:name="android.permission.INTERNET" />
    
    <!-- more stuff -->

</manifest>

Save file on File System

path = new java.io.File(
        Environment.getExternalStorageDirectory().toString()
        + "/Android/path/to/file.txt", "Cartella"
);
if (!path.exists()) {
    path.mkdirs();
}

// save File to 'path'