Method to take direct photo of the application only works on some cell phones [closed]

1

I have a problem with my apk that allows the user to take a direct photo of the application, but some phones give an error and close the app. Here is my manifesto:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="br.com.diego.tecnologiadanet">

    <uses-permission android:name="ANDROID.PERMISSION.CALL_PHONE"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-feature android:name="android.hardware.camera" />


    <supports-screens
        android:resizeable="true"
        android:smallScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true"
        android:normalScreens="true"
        android:anyDensity="true"/>

        <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:theme="@style/Theme.MyTheme">


        <activity
            android:name=".Splash"
            android:label="APP">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity android:name=".MainActivity"
            android:label="APP">
        </activity>

        <activity
            android:name=".SecondActivity"
            android:label="@string/title_activity_second"></activity>

        <activity
            android:name=".CarActivity"
            android:label="@string/title_activity_car"></activity>

    </application>
</manifest>

How do I fix this?

    
asked by anonymous 01.06.2016 / 20:45

1 answer

2

Without the description of the error it is very difficult to understand the problem and suggest a solution, but even so, let's go.

What I imagine is happening, as it is only on some phones, is that these cell phones are running the Android version of Marshmallow and have not enabled permission to use the camera directly from the App.

This is because in this version of Android a new form of permissions control has been introduced and how these permissions are requested from the user. For your App to work as expected, you need to adapt it to this new way of managing and asking for permission.

I suggest taking a look in this article from the official Android website for developers and also that < a href="http://www.androidcentral.com/how-take-advantage-new-app-permissions-marshmallow"> AndroidCentral

    
01.06.2016 / 22:32