<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="org.deke.risk.riskahead">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    <uses-permission android:name="org.deke.risk.riskahead.permission.MAPS_RECEIVE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="com.android.vending.BILLING" />

    <application
        android:name=".helper.AppController"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/MyRiskAheadTheme">

        <!-- Google Maps Android API V2 requires OpenGL ES version 2 -->
        <uses-feature
            android:glEsVersion="0x00020000"
            android:required="true" />

        <!-- Protect the map component of the application using application signature -->
        <permission
            android:name="org.deke.risk.riskahead.permission.MAPS_RECEIVE"
            android:protectionLevel="signature" />

        <!-- Google Maps Fragment API Key Data -->
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="AIzaSyALm-1lEf5xualfyHdmNEdAsXlbwOQhbI8" />
        <meta-data
            android:name="io.fabric.ApiKey"
            android:value="c44233e93b0a9702b00bd632380572d758096e3c" />
        <meta-data
            android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_app_id" />

        <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:theme="@android:style/Theme.Translucent" />
        <activity
            android:name=".StartActivity"
            android:label="@string/title_activity_start"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".LoginActivity"
            android:label="@string/app_name"
            android:parentActivityName=".StartActivity"
            android:screenOrientation="portrait">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".StartActivity" />
        </activity>
        <activity android:name="com.twitter.sdk.android.core.identity.OAuthActivity" />
        <activity
            android:name="com.facebook.FacebookActivity"
            android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:label="@string/app_name"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_entrance"
            android:parentActivityName=".LoginActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".MapsActivity"
            android:label="@string/title_activity_maps"
            android:parentActivityName=".MainActivity"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>

            <meta-data
                android:name="android.app.default_searchable"
                android:value=".MapsActivity" />
            <meta-data
                android:name="android.app.searchable"
                android:resource="@xml/searchable" />
        </activity>

        <provider
            android:name=".helper.PlaceProvider"
            android:authorities="org.deke.risk.riskahead.helper.PlaceProvider"
            android:exported="false" />

        <activity
            android:name=".ProfileActivity"
            android:label="@string/title_activity_user_config"
            android:parentActivityName=".MainActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".SettingsActivity"
            android:label="@string/title_activity_settings"
            android:screenOrientation="portrait" />
        <activity
            android:name=".SubscriptionsActivity"
            android:label="@string/title_activity_subscriptions"
            android:screenOrientation="portrait" />
        <activity
            android:name=".ViewReportActivity"
            android:label="@string/title_activity_view_report"
            android:screenOrientation="portrait" />
        <activity
            android:name=".ReportWFActivity"
            android:label="@string/title_activity_report_wf" />

        <service android:name=".helper.NotificationService"
            android:exported="false" />
    </application>

</manifest>
