<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="jp.agentec.abookplus"
    android:versionCode="1"
    android:versionName="@string/version_name"
    android:installLocation="internalOnly">

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_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.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.GET_TASKS" /><!-- ActivityManager.RunningTaskInfo -->
    <uses-permission android:name="android.permission.WAKE_LOCK" /><!-- using PowerManager WakeLocks to keep processor from sleeping or screen from dimming -->
    <uses-permission android:name="android.permission.READ_LOGS" /><!-- an application to read the low-level system log files. -->
    <uses-permission android:name="android.permission.VIBRATE" /><!-- ym.chae push message TODO -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /><!-- an app to access approximate location derived from network location sources such as cell towers and Wi-Fi. -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /><!-- an app to access precise location from location sources such as GPS, cell towers, and Wi-Fi -->
    <uses-permission android:name="android.permission.RECORD_AUDIO" /><!-- AudioPlayView -->
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

    <!-- GCM -->
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />

    <!-- QRCode -->
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.FLASHLIGHT"/>

    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />

    <permission
        android:name="${applicationId}.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

    <supports-screens android:anyDensity="true" android:xlargeScreens="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="false"/>
    
    <application
        android:name="jp.agentec.abook.abv.launcher.android.ABVApplication"
        android:icon="@drawable/app_icon"
        android:label="@string/app_name"
        android:theme="@style/ABook"
        android:allowBackup="false"
        tools:replace="android:allowBackup"
        android:usesCleartextTraffic="true"
        android:largeHeap="true"
        android:requestLegacyExternalStorage="true">
        <service android:name="jp.agentec.abook.abv.cl.push.ABVFcmListenerService">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT"></action>
            </intent-filter>
        </service>

        <service android:name="jp.agentec.abook.abv.cl.push.ABVInstanceIDListenerService">
            <intent-filter>
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT"></action>
            </intent-filter>
        </service>

        <service
            android:name="jp.agentec.abook.abv.launcher.android.BackgroundDownloadService"
            android:enabled="true"
            android:exported="false" />

        <receiver android:name="jp.agentec.abook.abv.launcher.android.OnAppDownloadReceiver">
            <intent-filter>
                <action android:name="android.intent.action.DOWNLOAD_NOTIFICATION_CLICKED" />
                <action android:name="android.intent.action.DOWNLOAD_COMPLETE" />
            </intent-filter>
        </receiver>

        <receiver android:name="jp.agentec.abook.abv.cl.environment.NetworkStateChangeReceiver">
            <intent-filter>
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
            </intent-filter>
        </receiver>

        <meta-data
                android:name="com.google.android.gms.version"
                android:value="@integer/google_play_services_version" />

        <provider
            android:name="jp.agentec.abook.abv.launcher.android.LogFileProvider"
            android:authorities="${applicationId}.logfileprovider"
            android:grantUriPermissions="true" >
        </provider>

        <provider
            android:name="jp.agentec.abook.abv.launcher.android.PDFFileProvider"
            android:authorities="${applicationId}.pdffileprovider"
            android:grantUriPermissions="true" >
        </provider>

        <provider
            android:name="android.support.v4.content.FileProvider"
            android:authorities="${applicationId}.provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths"/>
        </provider>
        
        <activity
            android:name="jp.agentec.abook.abv.ui.home.activity.PreSplashActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:launchMode="singleTask"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="${HOME_APP}"/>
            </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="@string/scheme_url" />
            </intent-filter>
            <!-- CMS content import start -->
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="file" android:mimeType="application/pdf" android:host="*" android:pathPattern=".*\\.pdf"/>
                <data android:scheme="file" android:mimeType="image/jpeg" android:host="*" android:pathPattern=".*\\.jpg"/>
                <data android:scheme="file" android:mimeType="image/jpeg" android:host="*" android:pathPattern=".*\\.jpeg"/>
                <data android:scheme="file" android:mimeType="image/png" android:host="*" android:pathPattern=".*\\.png"/>
                <data android:scheme="file" android:mimeType="image/gif" android:host="*" android:pathPattern=".*\\.gif"/>
                <data android:scheme="file" android:mimeType="video/*" android:host="*" android:pathPattern=".*\\.mp4"/>
                <data android:scheme="file" android:mimeType="video/*" android:host="*" android:pathPattern=".*\\.mov"/>
                <data android:scheme="file" android:mimeType="video/*" android:host="*" android:pathPattern=".*\\.m4v"/>
                <data android:scheme="file" android:mimeType="*/*" android:host="*" android:pathPattern=".*\\.mp3"/>
                <data android:scheme="file" android:mimeType="*/*" android:host="*" android:pathPattern=".*\\.wav"/>
                <data android:scheme="file" android:mimeType="*/*" android:host="*" android:pathPattern=".*\\.xls"/>
                <data android:scheme="file" android:mimeType="*/*" android:host="*" android:pathPattern=".*\\.xlsx"/>
                <data android:scheme="file" android:mimeType="*/*" android:host="*" android:pathPattern=".*\\.ppt"/>
                <data android:scheme="file" android:mimeType="*/*" android:host="*" android:pathPattern=".*\\.pptx"/>
                <data android:scheme="file" android:mimeType="*/*" android:host="*" android:pathPattern=".*\\.doc"/>
                <data android:scheme="file" android:mimeType="*/*" android:host="*" android:pathPattern=".*\\.docx"/>
            </intent-filter>
            <!-- CMS content import end -->
        </activity>
        <activity
            android:name="jp.agentec.abook.abv.ui.home.activity.SplashScreenActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
        <activity
            android:name="jp.agentec.abook.abv.ui.home.activity.LoginActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:label="LoginActivity"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen" />
        <activity
            android:name="jp.agentec.abook.abv.ui.viewer.activity.ContentViewActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:hardwareAccelerated="false"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen" />
        <activity
            android:name="jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity"
            android:configChanges="keyboardHidden|orientation|screenSize">
        </activity>
        <activity
            android:name="jp.agentec.abook.abv.ui.viewer.activity.HTMLXWalkWebViewActivity"
            android:configChanges="keyboardHidden|orientation|screenSize">
        </activity>
        <activity
            android:name="jp.agentec.abook.abv.ui.viewer.activity.EnqueteWebViewActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            >
        </activity>
        <activity
            android:name="jp.agentec.abook.abv.ui.viewer.activity.PreviewActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen" >
        </activity>
        <activity
            android:name="jp.agentec.abook.abv.ui.viewer.activity.VideoViewActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen" >
        </activity>
        <activity
            android:name="jp.agentec.abook.abv.ui.home.activity.LoginPasswordChangeActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:label="LoginPasswordChangeActivity"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen" >
        </activity>
        <activity
            android:name="jp.agentec.abook.abv.ui.viewer.activity.DeviceImageListActivityDialog"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:label="DeviceImageListActivity"
            android:theme="@style/Theme_Contentdetailview" />
        <activity android:name="jp.agentec.abook.abv.ui.viewer.activity.DeviceImageListActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen"/>

        <activity android:name="jp.agentec.abook.abv.ui.viewer.activity.theta.ThetaCameraActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen"/>
        <activity android:name="jp.agentec.abook.abv.ui.viewer.activity.theta.ThetaImageListActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen"/>
        <activity android:name="jp.agentec.abook.abv.ui.viewer.activity.theta.ThetaImagePreviewActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen"/>

        <activity android:name="jp.agentec.abook.abv.ui.home.activity.ABookSettingActivity" android:theme="@style/Theme.AppCompat.NoActionBar"/>
        <activity android:name="jp.agentec.abook.abv.ui.home.activity.ChangePasswordActivity" android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
        <activity android:name="jp.agentec.abook.abv.ui.home.activity.ChangePasswordActivityDialog" android:theme="@style/Theme.MyTheme.ModalDialog"/>
        <activity android:name="jp.agentec.abook.abv.ui.home.activity.HelpActivity" android:configChanges="orientation|screenSize"/>
        <activity android:name="jp.agentec.abook.abv.ui.home.activity.GuideViewActivity" android:configChanges="orientation|screenSize"/>

        <activity android:name="jp.agentec.abook.abv.ui.home.activity.HelpActivityDialog" android:theme="@style/Theme.MyTheme.ModalDialog"  android:configChanges="orientation|screenSize"/>

        <activity android:name="jp.agentec.abook.abv.ui.viewer.activity.AudioPlayActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen" />
        <activity android:name="jp.agentec.abook.abv.ui.viewer.activity.ImageViewActivity"
            android:hardwareAccelerated="false"
            android:configChanges="keyboardHidden"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen" />
        <activity android:name="jp.agentec.abook.abv.ui.common.activity.ShowPushMessageDailogActivity"
            android:theme="@android:style/Theme.Translucent.NoTitleBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
            </intent-filter>
        </activity>

        <!-- ABookCheck対応 -->
        <activity android:name="jp.agentec.abook.abv.ui.home.activity.OperationListActivity"
            android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
            android:resizeableActivity="true"
            android:windowSoftInputMode="adjustPan"/>
        <activity android:name="jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"/>
        <activity android:name="jp.agentec.abook.abv.ui.home.activity.OperationMeetingListActivity"/>
        <activity android:name="jp.agentec.abook.abv.ui.home.activity.OperationMeetingListActivityDialog" android:theme="@style/Theme.MyTheme.ModalDialog"/>

        <activity android:name="jp.agentec.abook.abv.ui.viewer.activity.CheckOZDViewActivity" android:configChanges="orientation|screenSize"/>

        <activity
            android:name="jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen" >
        </activity>

        <activity android:name="jp.agentec.abook.abv.ui.home.activity.ChatWebViewActivity"
            android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
            android:taskAffinity=".ChatWebViewActivity"
            android:resizeableActivity="true"
            android:excludeFromRecents="true"
            android:supportsPictureInPicture="true"/>

    </application>
</manifest>