<?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" android:maxSdkVersion="28"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <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" android:maxSdkVersion="30" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
    <uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
    <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
    <uses-permission android:name="android.permission.NFC" />

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

    <!-- BLE -->
    <uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>
    <uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>

    <permission
        android:name="${applicationId}.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />
    <!-- Android13 -->
    <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
    <!-- Android14 -->
    <uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED"/>

    <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"
        android:extractNativeLibs="true">

        <!-- LinkingビーコンIFの使用宣言 -->
        <meta-data
            android:name="com.nttdocomo.android.smartdeviceagent.feature.beacon"
            android:value="true" />
        <!-- LinkingビーコンIFの使用宣言 -->

        <service android:name="jp.agentec.abook.abv.cl.push.ABVFcmListenerService" android:exported="true">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT"></action>
            </intent-filter>
        </service>

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

        <receiver android:name="jp.agentec.abook.abv.launcher.android.OnAppDownloadReceiver" android:exported="true">
            <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" android:exported="true">
            <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="androidx.core.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="@style/Theme_fits_full" android:exported="true" >
            <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="@style/Theme_fits_full" />
        <activity
            android:name="jp.agentec.abook.abv.ui.home.activity.LoginActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:label="LoginActivity"
            android:theme="@style/Theme_fits_full" />
        <activity
            android:name="jp.agentec.abook.abv.ui.viewer.activity.ContentViewActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:hardwareAccelerated="true"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
        <activity
            android:name="jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@style/Theme_fits" >
        </activity>
        <activity
            android:name="jp.agentec.abook.abv.ui.viewer.activity.EnqueteWebViewActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@style/Theme_fits" >
        </activity>
        <activity
            android:name="jp.agentec.abook.abv.ui.viewer.activity.PreviewActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@style/Theme_fits_full" >
        </activity>
        <activity
            android:name="jp.agentec.abook.abv.ui.viewer.activity.VideoViewActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@style/Theme_fits_full" >
        </activity>
        <activity
            android:name="jp.agentec.abook.abv.ui.home.activity.LoginPasswordChangeActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:label="LoginPasswordChangeActivity"
            android:theme="@style/Theme_fits_full" >
        </activity>
        <activity android:name="jp.agentec.abook.abv.ui.home.activity.ABookSettingActivity" android:theme="@style/Theme_fits"/>
        <activity android:name="jp.agentec.abook.abv.ui.home.activity.ChangePasswordActivity" android:theme="@style/Theme_fits_full"/>
        <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_fits_full" />
        <activity android:name="jp.agentec.abook.abv.ui.viewer.activity.ImageViewActivity"
            android:hardwareAccelerated="false"
            android:configChanges="keyboardHidden"
            android:theme="@style/Theme_fits_full" />
        <activity android:name="jp.agentec.abook.abv.ui.common.activity.ShowPushMessageDailogActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:exported="true">
            <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="keyboardHidden|orientation|screenSize"/>
        <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"/>

        <!-- ABookCheck1.0.0 Sato -->
        <activity android:name="jp.agentec.abook.abv.ui.home.activity.BlePairingSettingActivity"
            android:theme="@style/AppTheme"
            android:configChanges="keyboardHidden|orientation|screenSize"/>
        <activity android:name="jp.agentec.abook.abv.ui.home.activity.BarCodeReaderActivity"
            android:theme="@style/AppTheme"
            android:configChanges="keyboardHidden|orientation|screenSize"/>
        <activity android:name="jp.agentec.abook.abv.ui.home.activity.SppBluetoothPairingSettingActivity"
            android:theme="@style/AppTheme"/>

        <!-- @Form I/O帳票 -->
        <activity
            android:name="jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@style/Theme_fits_full" >
        </activity>
        <!-- @Form QRコードリーダー -->
        <activity android:name="jp.agentec.abook.abv.ui.home.activity.CaptureQRCodeActivity" android:theme="@style/Theme_fits_full"/>
        <activity android:name="jp.agentec.abook.abv.ui.home.activity.CaptureQRCodeActivityDialog" android:theme="@android:style/Theme.Holo.Dialog.NoActionBar"/>

    </application>
</manifest>