<?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="com.ntels.onecable">

  <!-- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> -->
  <!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> -->
  <!-- <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/> -->
  <!-- <uses-permission android:name="android.permission.READ_CONTACTS"/> -->
  <!-- <uses-permission android:name="android.permission.WRITE_CONTACTS"/> -->
  <!-- <uses-permission android:name="android.permission.RECEIVE_SMS"/> -->
  <!-- <uses-permission android:name="android.permission.USE_CREDENTIALS"/> -->
  <!-- <uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"/> -->
  <!-- <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/> -->

  <uses-permission android:name="android.permission.BLUETOOTH"/>
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
  <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
  <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
  <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
  <uses-permission android:name="android.permission.CAMERA"/>
  <uses-permission android:name="android.permission.FLASHLIGHT"/>
  <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
  <uses-permission android:name="android.permission.GET_TASKS"/>
  <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"/>
  <uses-permission android:name="android.permission.INTERNET"/>
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
  <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
  <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
  <uses-permission android:name="android.permission.VIBRATE"/>
  <uses-permission android:name="android.permission.WAKE_LOCK"/>
  <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
  <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>

  <!-- 20160816 IP Camera 추가로 인해 권한 추가 -->
  <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
  <uses-permission android:name="android.permission.RECORD_AUDIO"/>
  <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
  <uses-permission android:name="android.permission.PHONE_CALLS"/>
  <uses-permission android:name="android.permission.MICROPHONE"/>
  <uses-permission android:name="android.permission.AUDIO_SETTINGS"/>

  <uses-feature
      android:name="android.hardware.camera"
      android:required="false"/>
  <uses-feature
      android:name="android.hardware.camera.front"
      android:required="false"/>
  <uses-feature
      android:name="android.hardware.camera.autofocus"
      android:required="false"/>
  <uses-feature
      android:name="android.hardware.camera.flash"
      android:required="false"/>
  <uses-feature android:name="android.hardware.screen.landscape"/>
  <uses-feature
      android:name="android.hardware.wifi"
      android:required="false"/>
  <uses-feature android:name="android.hardware.touchscreen"/>
  <uses-feature
      android:name="android.hardware.telephony"
      android:required="false"/>
  <uses-feature
      android:glEsVersion="0x00020000"
      android:required="true"/>

  <application
      android:name=".common.AppConfig"
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:largeHeap="true"
      android:theme="@style/AppTheme"
      tools:replace="android:label"
      android:hardwareAccelerated="true">
    <activity
        android:name=".view.Intro"
        android:configChanges="fontScale"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@style/Translucent"
        android:windowSoftInputMode="stateAlwaysHidden|adjustPan">
      <intent-filter>
        <action android:name="android.intent.action.MAIN"/>

        <category android:name="android.intent.category.LAUNCHER"/>
      </intent-filter>
    </activity>
    <activity
        android:name=".view.AppStart"
        android:configChanges="fontScale"
        android:excludeFromRecents="true"
        android:launchMode="singleTask"
        android:screenOrientation="portrait"
        android:taskAffinity=""
        android:theme="@style/Translucent">
      <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:host="start"
            android:scheme="ntels_onecable_v1"/>
      </intent-filter>
    </activity>
    <activity
        android:name=".view.Login"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/Translucent"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.LoginNewDevice"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.invitation.InvitationList"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.ResetPassword"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.Join"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.HomeStart"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.JoinCheck"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.Main"
        android:configChanges="fontScale"
        android:launchMode="singleTask"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.mainmore.FragmentMainMore"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/Translucent"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.mainmore.Setting"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.mainmore.Homehub"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.invitation.InvitationReply"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.homemember.HomeMemberAdd"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.mainmore.MessageCenter"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.mainmore.Notice"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.things.ThingsDeviceAdd"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.rules.RulesDetail"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.rules.RulesEdit"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.things.ThingsDetail"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.mainmore.Homemode"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.mainmore.HomemodeEdit"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>

    <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="@string/google_app_id"/>
    <!-- GCM 서비스 -->
    <!-- [START gcm_receiver] -->
    <receiver
            android:name="com.google.android.gms.gcm.GcmReceiver"
            android:exported="true"
            android:permission="com.google.android.c2dm.permission.SEND">
      <intent-filter>
        <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
        <category android:name="net.saltfactory.gcm"/>
      </intent-filter>
    </receiver>
    <!-- [END gcm_receiver] -->

    <!-- [START gcm_listener_service] -->
    <service
            android:name=".common.gcm.GcmIntentService"
            android:exported="false">
      <intent-filter>
        <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
      </intent-filter>
    </service>
    <!-- [END gcm_listener_service] -->

    <!-- [START instanceId_listener_service] -->
    <service
            android:name=".common.gcm.MyInstanceIDListenerService"
            android:exported="false">
      <intent-filter>
        <action android:name="com.google.android.gms.iid.InstanceID"/>
      </intent-filter>
    </service>
    <!-- [END instanceId_listener_service] -->

    <!-- [START gcm_registration_service] -->
    <service
            android:name=".common.gcm.RegistrationIntentService"
            android:exported="false"/>
    <!-- [END gcm_registration_service] -->
    <!-- GCM 서비스 -->

    <!-- Loacal Process BoroadCast Receiver -->
    <!-- GCM 서비스 -->
      <!-- GCM 서비스 -->
    <!-- Mdns 서비스 -->
    <receiver android:name=".common.mdns.MdnsRegBroadcastRecevier">
      <intent-filter>
        <action android:name="android.intent.action.BOOT_COMPLETED"/>
        <action android:name="android.net.wifi.WIFI_STATE_CHANGED"/>
        <action android:name="android.net.wifi.STATE_CHANGE"/>
        <action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
      </intent-filter>
    </receiver>
    <receiver
        android:name=".common.mdns.RestartService"
        android:enabled="true"
        android:exported="false"
        android:label="RestartService"
        android:process=":remote">
      <intent-filter>
        <action android:name="ACTION.Restart.PersistentService"/>
      </intent-filter>
    </receiver>

    <service
        android:name=".common.mdns.MdnsRegService"
        android:exported="false"/>

    <!-- GCM Push서비스 -->
    <!-- DialogSpinner -->
    <activity
        android:name=".view.dialog.PushDialog"
        android:configChanges="fontScale"
        android:excludeFromRecents="true"
        android:launchMode="singleTask"
        android:screenOrientation="portrait"
        android:taskAffinity=""
        android:theme="@style/Translucent"/>
    <activity
        android:name=".view.ImageSelect"
        android:configChanges="orientation|fontScale|keyboardHidden|screenSize"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"/>
    <activity
        android:name=".view.dialog.DialogSpinner"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.things.ThingsDeviceAdd1st"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.things.ThingsDeviceAdd2nd"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.things.ThingsDeviceAdd3rd"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.things.ThingsDeviceDel1st"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.things.ThingsDeviceDel2nd"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.things.ThingsDeviceDel3rd"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.things.ThingsHomehubInput"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.mainmore.SettingNameChange"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.mainmore.HomehubPasswordChange"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.mainmore.SettingEmailChange"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.mainmore.SettingPasswordChange"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.mainmore.SettingPasswordCheck"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.rules.RulesTriggersSelect"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.rules.RulesTriggersTime"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.rules.RulesTriggersSun"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.rules.RulesTriggersTemp"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.rules.RulesTemperatureSelect"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.rules.RulesDateSelect"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.rules.RulesMultiSensorSelect"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.rules.RulesThingsSelect"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.rules.RulesAddSucess"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.things.ThingsNameChange"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>

    <service
        android:name=".common.websocket.WebSocketService"
        android:enabled="true"
        android:exported="true"/>

    <receiver android:name=".common.websocket.NetworkStateReceiver">
      <intent-filter>
        <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
      </intent-filter>
    </receiver>

    <activity
        android:name=".view.things.ThingsHomehubGuide"
        android:screenOrientation="portrait"
        android:theme="@style/Translucent"/>
    <activity
        android:name=".view.things.ThingsHomehubRegister"
        android:screenOrientation="portrait"
        android:theme="@style/Translucent"/>
    <activity
        android:name=".view.things.ThingsHomehubSetPassword"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.things.ThingsHomehubAssignPassword"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.things.ThingsCameraDetail"
        android:configChanges="fontScale"
        android:screenOrientation="landscape"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.things.ThingsDeviceNetatmoLogin"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.things.ThingsDeviceNetatmoCameraDetail"
        android:configChanges="fontScale"
        android:screenOrientation="landscape"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
        android:name=".view.things.ThingsDeviceNetatmoCameraList"
        android:configChanges="fontScale"
        android:screenOrientation="portrait"
        android:theme="@style/NTLES_Dialog1"
        android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
            android:name=".view.things.ThingsDeviceLedBulbDetail"
            android:configChanges="fontScale"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <activity
            android:name=".view.rules.RulesColorSelect"
            android:configChanges="fontScale"
            android:screenOrientation="portrait"
            android:theme="@style/NTLES_Dialog1"
            android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
    <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>
  </application>

</manifest>