<?xml version="1.0" encoding="utf-8"?>
<!--
  ~
  ~ *  Copyright (C) 2020, University of the Basque Country (UPV/EHU)
  ~ *
  ~ * Contact for licensing options: <licensing-mcpttclient(at)mcopenplatform(dot)com>
  ~ *
  ~ * This file is part of MCOP MCPTT Client
  ~ *
  ~ * This is free software: you can redistribute it and/or modify it under the terms of
  ~ * the GNU General Public License as published by the Free Software Foundation, either version 3
  ~ * of the License, or (at your option) any later version.
  ~ *
  ~ * This is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  ~ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  ~ * See the GNU General Public License for more details.
  ~ *
  ~ * You should have received a copy of the GNU General Public License along
  ~ * with this program; if not, write to the Free Software Foundation, Inc.,
  ~ * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="org.mcopenplatform.muoapi">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
    <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.WRITE_CONTACTS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.RAISED_THREAD_PRIORITY" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>

    <!-- Location permission -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <!-- SIM permission -->
    <uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
    <uses-permission android:name="android.permission.WRITE_APN_SETTINGS" />

    <application
        android:name="org.doubango.ngn.NgnApplication"
        android:usesCleartextTraffic="true"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <service
            android:name="org.mcopenplatform.muoapi.MCOPsdk"
            android:enabled="true"
            android:exported="true" />
        <activity
            android:name="org.mcopenplatform.muoapi.mcopsdk.MainActivity"
            android:label="@string/title_activity_main"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name="org.mcopenplatform.muoapi.mcopsdk.ScreenAutheticationWebView"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="com.google.codelabs.appauth.HANDLE_AUTHORIZATION_RESPONSE" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name="org.mcopenplatform.muoapi.utils.PermissionRequestUtils$PermissionActivity"
            android:theme="@style/Theme.Transparent"></activity>
    </application>

</manifest>