xamarin.android - I have created a xamarin camera app ,i need help set the camera app a default camera u sing the manifest -


i have created xamarin camera app, , need set camera app default camera using manifest.

you can find manifest code below, can please me set camera app default app. how can set app default app when open web app uses camera can see 1 of available use

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android">     <uses-sdk android:minsdkversion="15" />     <application android:label="menikocamera.droid"></application>     <uses-permission android:name="android.permission.write_external_storage" />     <uses-permission android:name="android.permission.camera" />   <uses-feature android:name="android.hardware.camera" android:required="true"/>       <activity android:name="menikocamera.mainactivity" android:label="@string/app_name" android:configchanges="screensize" android:icon="@drawable/icon" android:screenorientation="portrait" >         <intent-filter>             <action android:name="android.intent.action.main" />             <category android:name="android.intent.category.launcher" />         </intent-filter>         <intent-filter>             <action android:name="android.media.action.image_capture" />             <category android:name="android.intent.category.default" />         </intent-filter>         <intent-filter>             <action android:name="android.media.action.still_image_capture" />             <category android:name="android.intent.category.default" />         </intent-filter>     </activity> </manifest> 

you can't.

third party developers cannot set own app default applications. users of app can on own devices.

you can however, register receive intents of types app supports users can select app default. example, need <category> on <activity> <intent-filter>, there @ least 1 category on intent used startactivity().

<intent-filter>         <action android:name="android.intent.action.view" />         <category android:name="android.intent.category.default" />         <data android:scheme="file"/>         <data android:mimetype="audio/*"/>         <data android:mimetype="application/ogg"/>         <data android:mimetype="application/x-ogg"/>         <data android:mimetype="application/itunes"/>     </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="http" />         <data android:mimetype="audio/*"/>         <data android:mimetype="application/ogg"/>         <data android:mimetype="application/x-ogg"/>         <data android:mimetype="application/itunes"/>     </intent-filter>     <intent-filter         android:priority="-1">         <action android:name="android.intent.action.view" />         <category android:name="android.intent.category.default" />         <category android:name="android.intent.category.browsable" />         <data android:scheme="content" />         <data android:mimetype="audio/*"/>         <data android:mimetype="application/ogg"/>         <data android:mimetype="application/x-ogg"/>         <data android:mimetype="application/itunes"/>     </intent-filter> 

for camera

 <intent-filter>             <action android:name="android.intent.action.main" />             <category android:name="android.intent.category.default" />             <category android:name="android.intent.category.launcher" />         </intent-filter>         <intent-filter>             <action android:name="android.media.action.image_capture" />             <category android:name="android.intent.category.default" />         </intent-filter>         <intent-filter>             <action android:name="android.media.action.still_image_camera" />             <category android:name="android.intent.category.default" />         </intent-filter> 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -