1
resposta

Erro no Android Manifest

files under the build folder are generated and should not be edited

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

    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="27" />

    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.RECEIVE_SMS" />

    <application
        android:allowBackup="true"
        android:debuggable="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:testOnly="true"
        android:theme="@style/AppTheme" >
        <activity android:name="com.br.agenda.ListaAlunosActivity" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="com.br.agenda.FormularioActivity" />

        <receiver android:name="com.br.agenda.receiver.SMSReceiver" />

        <intent-filter>
            <action android:name="android.provider.Telephony.SMS_RECEIVED" />
        </intent-filter>
    </application>

</manifest>
1 resposta

Fala ai Viktor, tudo bem ?

Tem um pequeno erro de digitação :(

Você não colocou o IntentFilter dentro do seu Receiver :


        <receiver android:name="com.br.agenda.receiver.SMSReceiver" />

        <intent-filter>
            <action android:name="android.provider.Telephony.SMS_RECEIVED" />
        </intent-filter>

O correto seria:

<receiver>
    <intent-filter>
        <action eou category />
    <intent-filter>
</receiver>