Теги AndroidManifest в каталоге Android неизвестны Flutter - PullRequest
0 голосов
/ 02 октября 2019

Мне нужно иметь некоторые собственные коды Android и конфиги в моем проекте Flutter, например, в файле AndroidManifest.xml. Но атрибуты тегов, которые я добавляю, неизвестны (красного цвета) и не работают, в частности теги <receiver> и <intent-filter>, которые я здесь использую.

Мне также нужно обратиться к некоторым нативным java-файлам, расположенным в библиотеке Flutter, и я тоже не знаю, как это сделать!

Ниже приведены мои манифестные изображения в моей IDE и их код:

android manifest snapshot

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.flutterapp">

    <!-- The INTERNET permission is required for development. Specifically,
         flutter needs it to communicate with the running application
         to allow setting breakpoints, to provide hot reload, etc.
    -->

    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
         calls FlutterMain.startInitialization(this); in its onCreate method.
         In most cases you can leave this as-is, but you if you want to provide
         additional functionality it is fine to subclass or reimplement
         FlutterApplication and put your custom class here. -->
    <application
        android:name="io.flutter.app.FlutterApplication"
        android:label="my app"
        android:allowBackup="false"
        android:fullBackupContent="false"
        android:icon="@mipmap/ic_launcher">

        <activity android:name=".MainActivity"
            android:launchMode="singleTop"
            android:theme="@android:style/Theme.Black.NoTitleBar"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>





        <receiver android:name = ".SmsReceiver" android:permission="android.permission.BROADCAST_SMS">

            <intent-filter android:priority="999" >
                <action android:name="android.intent.action.SMS_RECEIVED" />
                <action android:name="android.provider.Telephony.SMS_DELIVER" />
                <data
                    android:scheme="sms"
                    android:host="*"
                    android:port="1235" />
            </intent-filter>
        </receiver>

    </application>
</manifest>

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...