<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="org.coolreader"
      android:installLocation="auto"
      android:versionName="3.1.2-39" android:versionCode="859">
    <supports-screens
        android:xlargeScreens="true"
        android:largeScreens="true"
        android:normalScreens="true" 
        android:resizeable="true" 
        android:smallScreens="true"
        android:anyDensity="true"
    />
    
    <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="16" />
    
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <!-- uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE"/-->
    <uses-permission android:name="android.permission.INTERNET"/>
    <!-- Stop TTS on incoming call -->
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <!-- Hide Android3 soft buttons on Archos -->
    <!--uses-permission android:name="archos.permission.FULLSCREEN.FULL"/-->
    <!-- Required permission to use in-app billing. -->
    <uses-permission android:name="com.android.vending.BILLING" />
    <application android:label="@string/app_name"
        android:icon="@drawable/cr3_logo"
        
        android:allowClearUserData="true"
        android:process="org.coolreader"
        >
<!--
            android:configChanges="orientation|keyboardHidden|locale|screenSize"
-->
        <activity android:name=".CoolReader"
            android:label="@string/app_name" 
            android:configChanges="orientation|keyboardHidden|locale|screenSize"
            android:theme="@android:style/Theme.NoTitleBar"
            android:launchMode="singleTask"
            android:windowSoftInputMode="stateHidden"
            android:screenOrientation="sensor">
            
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:host="" android:scheme="file" />
                <data android:pathPattern=".*\\.fb2\\.zip"/>
                <data android:pathPattern=".*\\.zip"/>
                <data android:pathPattern=".*\\.fb2"/>
                <data android:pathPattern=".*\\.txt"/>
                <data android:pathPattern=".*\\.html"/>
                <data android:pathPattern=".*\\.xhtml"/>
                <data android:pathPattern=".*\\.htm"/>
                <data android:pathPattern=".*\\.chm"/>
                <data android:pathPattern=".*\\.epub"/>
                <data android:pathPattern=".*\\.pdb"/>
                <data android:pathPattern=".*\\.doc"/>
                <data android:pathPattern=".*\\.prc"/>
                <data android:pathPattern=".*\\.pml"/>
                <data android:pathPattern=".*\\.mobi"/>
                <data android:pathPattern=".*\\.azw"/>
                <data android:pathPattern=".*\\.tcr"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:host="" android:scheme="file" />
                <data android:mimeType="text/plain"/>
                <data android:mimeType="text/html"/>
                <data android:mimeType="application/zip"/>
                <data android:mimeType="application/rtf"/>
                <data android:mimeType="application/msword"/>
                <data android:mimeType="application/x-rtf"/>
                <data android:mimeType="text/richtext"/>
                <data android:mimeType="application/epub+zip"/>
                <data android:mimeType="application/x-chm"/>
                <data android:mimeType="application/msword"/>
                <data android:mimeType="application/fb2"/>
                <data android:mimeType="application/fb2.zip"/>
                <data android:mimeType="application/epub"/>
                <data android:mimeType="application/x-fictionbook"/>
                <data android:mimeType="application/doc"/>
                <data android:mimeType="application/vnd.msword"/> 
                <data android:mimeType="application/vnd.ms-word"/>
                <data android:mimeType="application/winword"/>
                <data android:mimeType="application/word"/>
                <data android:mimeType="application/x-msw6"/>
                <data android:mimeType="application/x-msword"/>
            </intent-filter>
        </activity>
       
        
        <!-- Sync support -->
        <service android:name=".sync.SyncService" />
        <!-- Database service -->
        <service android:name=".db.CRDBService" />
        
        <!-- Donations support -->
        <service android:name=".donations.BillingService" />
        
        <receiver android:name="org.coolreader.donations.BillingReceiver">
            <intent-filter>
                <action android:name="com.android.vending.billing.IN_APP_NOTIFY" />
                <action android:name="com.android.vending.billing.RESPONSE_CODE" />
                <action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" />
            </intent-filter>
        </receiver>
        <!-- Stop TTS on incoming call -->
  		<receiver android:name="org.coolreader.PhoneStateReceiver">
	        <intent-filter>
                <action android:name="android.intent.action.PHONE_STATE" />     
	        </intent-filter>
		</receiver>
    </application>
</manifest> 
