<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
  <!-- support large + xlarge screens to avoid compatibility mode -->
  <supports-screens android:largeScreens="true" />
  <supports-screens android:xlargeScreens="true" />

  <!-- This .apk has Java code, so set hasCode to true. -->
  <application android:label="@string/app_name"
               android:hasCode="true"
               android:hardwareAccelerated="true"
               android:usesCleartextTraffic="true"
               android:hasFragileUserData="true"
               android:icon="@mipmap/ic_launcher">
    <!-- Our activity is based on the built-in NativeActivity framework class.
         This will take care of integrating with our NDK code. -->
    <activity android:name="net.sourceforge.smallbasic.MainActivity"
              android:label="@string/app_name"
              android:theme="@style/SBTheme"
              android:configChanges="orientation|keyboardHidden|screenSize"
              android:exported="true">
      <!-- Tell NativeActivity the name of our .so -->
      <meta-data android:name="android.app.lib_name"
                 android:value="smallbasic" />
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <data android:host=""
              android:mimeType="*/*"
              android:scheme="file"/>
        <data android:pathPattern=".*\\.bas"/>
        <data android:pathPattern=".*\\..*\\.bas" />
        <data android:pathPattern=".*\\..*\\..*\\.bas" />
        <data android:pathPattern=".*\\..*\\..*\\..*\\.bas" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <data android:host=""
              android:scheme="file"
              android:mimeType="text/plain"/>
        <data android:pathPattern=".*\\.bas"/>
        <data android:pathPattern=".*\\..*\\.bas" />
        <data android:pathPattern=".*\\..*\\..*\\.bas" />
        <data android:pathPattern=".*\\..*\\..*\\..*\\.bas" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="smallbasic" />
      </intent-filter>
    </activity>
    <provider
      android:name="androidx.core.content.FileProvider"
      android:authorities="net.sourceforge.smallbasic.provider"
      android:exported="false"
      android:grantUriPermissions="true">
      <meta-data
        android:name="android.support.FILE_PROVIDER_PATHS"
        android:resource="@xml/file_paths"/>
    </provider>
  </application>
  <!-- Permissions -->
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  <uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
  <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
  <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
  <uses-permission android:name="android.permission.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation"/>
  <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
</manifest>

