首页 > 解决方案 > 使用移动应用程序中的 twilio 的短信不起作用

问题描述

根据本教程中的指南。

我已经完成了一切。但它不起作用。没有发生错误。我不知道在哪里检查问题。请有人可以帮助我解决问题或至少在哪里寻找问题?

请在下面的清单文件中找到

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:dist="http://schemas.android.com/apk/distribution"
            package="uhnm.stroke.strokeapp_secondscreen">

            <dist:module dist:instant="true" />

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

            <application
                android:allowBackup="true"
                android:icon="@mipmap/ic_launcher"
                android:label="@string/app_name"
                android:roundIcon="@mipmap/ic_launcher_round"
                android:supportsRtl="true"
                android:theme="@style/AppTheme"
                android:usesCleartextTraffic="true">

                <activity android:name=".NIHSSActivityPage4" android:windowSoftInputMode="adjustPan"/>
                <activity android:name=".TeamsDisplay" android:windowSoftInputMode="adjustPan" />
                <activity android:name=".imageActivity" android:windowSoftInputMode="adjustPan" />
                <activity android:name=".timesActivity" />
                <activity android:name=".configurationActivity" />
                <activity android:name=".addConsultants" />
                <activity android:name=".NIHSSActivityFinalPage"android:windowSoftInputMode="adjustPan" />
                <activity android:name=".NIHSSActivityPage3" android:windowSoftInputMode="adjustPan" />
                <activity android:name=".NIHSSActivityPage2" android:windowSoftInputMode="adjustPan" />
                <activity android:name=".MainActivity" android:windowSoftInputMode="adjustPan" />
                <activity android:name=".EnterBrainTracker" />
                <activity android:name=".NIHSSActivity" android:windowSoftInputMode="adjustPan" />
                <activity
                    android:name=".signIn"
                    android:windowSoftInputMode="adjustPan">
                    <intent-filter>
                        <action android:name="android.intent.action.MAIN" />
                        <category android:name="android.intent.category.LAUNCHER" />
                    </intent-filter>
                </activity>

                <service
                        android:name=".MyFirebaseMessagingService"
                        android:exported="false">
                    <intent-filter>
                        <action android:name="com.google.firebase.MESSAGING_EVENT" />
                     </intent-filter>
                    </service>

                    <meta-data
                            android:name="strokeapp.messaging.default_notification_channel_id"
                            android:value="@string/default_notification_channel_id" />
                    </application>

            </manifest>

这里是应用程序 gradle 文件:

    apply plugin: 'com.android.application'

    apply plugin: 'com.google.gms.google-services'

    android {

     compileSdkVersion 29

     buildToolsVersion "29.0.2"

        //useLibrary 'org.apache.http.legacy'

        defaultConfig {

            applicationId "uhnm.stroke.strokeapp_secondscreen"

            minSdkVersion 16

            targetSdkVersion 29

            versionCode 1

            versionName "1.0"

            testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

            multiDexEnabled true

        }

        buildTypes {

             release {

                    minifyEnabled false

                    proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

            }

        }

        packagingOptions

            {

                exclude 'META-INF/DEPENDENCIES'

            }

}

dependencies {

        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:multidex:1.0.3'
        implementation 'androidx.appcompat:appcompat:1.1.0'
        implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
        implementation 'com.google.firebase:firebase-database:19.2.0'
        implementation 'com.google.firebase:firebase-storage:19.1.0'
        implementation 'com.google.firebase:firebase-auth:19.1.0'

        implementation 'com.google.firebase:firebase-core:17.2.1'
        implementation 'com.google.firebase:firebase-messaging:20.0.0'

        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'androidx.test:runner:1.2.0'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
        implementation 'com.android.support:support-annotations:28.0.0'
        implementation 'com.google.android.material:material:1.1.0-alpha10'
        implementation group: "com.twilio.sdk", name: "twilio", version: "7.44.0"
        implementation 'com.squareup.okhttp3:okhttp:4.2.1'
}

标签: gradletwilio

解决方案


推荐阅读