<?xml version="1.0" encoding="utf-8"?>
<!-- 
  ownCloud Android client application

  Copyright (C) 2012  Bartek Przybylski
  Copyright (C) 2012-2014 ownCloud Inc.

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 2,
  as published by the Free Software Foundation.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
<manifest package="com.owncloud.android"
    android:versionCode="105007"
    android:versionName="1.5.7" xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
    <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
    <uses-permission android:name="android.permission.READ_SYNC_STATS" />
    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    
    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="19" />

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

    <application
        android:name=".MainApp"
        android:icon="@drawable/icon"
        android:label="@string/app_name"
        android:theme="@style/Theme.ownCloud"> 
        <activity
            android:name=".ui.activity.FileDisplayActivity"
            android:label="@string/app_name"
            >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".ui.activity.UploadFilesActivity">
        </activity>
 		<activity android:name=".ui.activity.InstantUploadActivity">
        </activity>
        <activity android:name=".ui.activity.FailedUploadActivity" android:theme="@android:style/Theme.Dialog" android:excludeFromRecents="true"/>
        <activity android:name=".ui.activity.Uploader" >
            <intent-filter>
                <action android:name="android.intent.action.SEND" >
                </action>

                <category android:name="android.intent.category.DEFAULT" >
                </category>

                <data android:mimeType="*/*" >
                </data>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEND_MULTIPLE" >
                </action>

                <category android:name="android.intent.category.DEFAULT" >
                </category>

                <data android:mimeType="*/*" >
                </data>

			</intent-filter>
        </activity>
        <activity
            android:name=".ui.activity.Preferences"
            android:theme="@style/Theme.ownCloud" >
        </activity>
        <activity android:name=".ui.activity.PreferencesNewSessionewSession" >
        </activity>
        
        <activity	
            android:name=".ui.preview.PreviewImageActivity" 
            />
		        
        <activity	
            android:name=".ui.preview.PreviewVideoActivity"
			android:label="@string/app_name"
			android:theme="@style/Theme.ownCloud.Fullscreen" 
			>
		</activity>        

        <service
            android:name=".authentication.AccountAuthenticatorService"
            android:exported="true">
            <intent-filter  android:priority="100">
                <action android:name="android.accounts.AccountAuthenticator" />
            </intent-filter>

            <meta-data
                android:name="android.accounts.AccountAuthenticator"
                android:resource="@xml/authenticator" />
        </service>
        <service
            android:name=".syncadapter.FileSyncService"
            android:exported="true" 
            >
            <intent-filter>
                <action android:name="android.content.SyncAdapter" />
            </intent-filter>

            <meta-data
                android:name="android.content.SyncAdapter"
                android:resource="@xml/syncadapter_files" />
        </service>

        <provider
            android:name=".providers.FileContentProvider"
            android:authorities="@string/authority"
            android:enabled="true"
            android:exported="false"
            android:label="@string/sync_string_files"
            android:syncable="true" >
        </provider>

        <activity
            android:name=".authentication.AuthenticatorActivity"
            android:exported="true"
            android:theme="@style/Theme.ownCloud.noActionBar" 
            android:launchMode="singleTask">
            <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/oauth2_redirect_scheme" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.owncloud.android.workaround.accounts.CREATE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <service android:name=".services.OperationsService" />
        <service android:name=".files.services.FileDownloader" />
        <service android:name=".files.services.FileUploader" />
        <service android:name=".media.MediaService" />
        
        <activity android:name=".ui.activity.PinCodeActivity" />
        <activity android:name=".ui.activity.AccountSelectActivity" android:uiOptions="none" android:label="@string/prefs_accounts"></activity>
        <activity android:name=".ui.activity.ConflictsResolveActivity"/>
        <activity android:name=".ui.activity.GenericExplanationActivity"/>
        <activity android:name=".ui.activity.ErrorsWhileCopyingHandlerActivity"/>
        
        <activity android:name=".ui.activity.LogHistoryActivity"/>
        
        <receiver android:name=".files.InstantUploadBroadcastReceiver">
            <intent-filter>
                <!-- unofficially supported by many Android phones but not by HTC devices: -->
                <action android:name="com.android.camera.NEW_PICTURE" />
                <!-- officially supported since Android 4.0 (SDK 14, works even for HTC devices): --> 
                <action android:name="android.hardware.action.NEW_PICTURE" />
                <data android:mimeType="image/*" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.hardware.action.NEW_VIDEO" />
                <data android:mimeType="video/*" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
            </intent-filter>
        </receiver>
        <receiver android:name=".files.BootupBroadcastReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
            </intent-filter>
        </receiver>
        <service android:name=".files.services.FileObserverService"/>
        
        <activity 
            android:name=".ui.activity.CopyToClipboardActivity" 
           	android:label="@string/copy_link"
           	android:icon="@drawable/copy_link" />
        
    </application>

</manifest>