ahmedelkhyary / hyperpay

MIT License
6 stars 18 forks source link

Integration Crashes in AndroidManifest File #43

Closed MostafaAmerAts closed 6 months ago

MostafaAmerAts commented 6 months ago

I have added the aar files. I have added the package to my project. I have added the intent-filter tags contains the shopper schema in the MainActivity tag.

but when run the project it keeps crash, check the below: D:\android\app\src\debug\AndroidManifest.xml:28:13-55 Error: Attribute activity#com.oppwa.mobile.connect.checkout.dialog.CheckoutActivity@windowSoftInputMode value=(adjustResize) from [oppwa.mobile-5.1.0-release.aar] AndroidManifest.xml:28:13-55 is also present at [:hyperpay_plugin] AndroidManifest.xml:37:13-52 value=(adjustPan). Suggestion: add 'tools:replace="android:windowSoftInputMode"' to <activity> element at AndroidManifest.xml:24:9-28:58 to override.

What have I tried? 1 - Add 'tools:replace="android:windowSoftInputMode"' as suggested (tools prefix couldn't be imported) 2 - remove the whole line or any usage of 'windowSoftInputMode' attribute

This is my Manifest file

 `<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<uses-permission android:name="android.permission.health.READ_HEART_RATE" />
<uses-permission android:name="android.permission.health.WRITE_HEART_RATE" />

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

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

<uses-permission android:name="android.permission.health.READ_STEPS" />
<uses-permission android:name="android.permission.health.WRITE_STEPS" />

<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />

<!-- Check whether Health Connect is installed or not -->
<queries>
    <package android:name="com.google.android.apps.healthdata" />
    <intent>
        <action android:name="androidx.health.ACTION_SHOW_PERMISSIONS_RATIONALE" />
    </intent>
</queries>

<queries>
    <intent>
        <action android:name="android.intent.action.TTS_SERVICE" />
    </intent>
</queries>

<queries>
    <intent>
        <action android:name="android.speech.RecognitionService" />
    </intent>
</queries>

<application
    android:label="patient"
    android:name="${applicationName}"
    android:icon="@mipmap/ic_launcher">

    <activity-alias
        android:name="ViewPermissionUsageActivity"
        android:exported="true"
        android:targetActivity=".MainActivity"
        android:permission="android.permission.START_VIEW_PERMISSION_USAGE">
        <intent-filter>
            <action android:name="android.intent.action.VIEW_PERMISSION_USAGE" />
            <category android:name="android.intent.category.HEALTH_PERMISSIONS" />
        </intent-filter>
    </activity-alias>

    <activity
        android:name=".MainActivity"
        android:exported="true"
        android:launchMode="singleTop"
        android:theme="@style/LaunchTheme"
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
        android:hardwareAccelerated="true"
        tools:replace="android:windowSoftInputMode">
        <!-- Specifies an Android theme to apply to this Activity as soon as
             the Android process has started. This theme is visible to the user
             while the Flutter UI initializes. After that, this theme continues
             to determine the Window background behind the Flutter UI. -->
        <meta-data
            android:name="io.flutter.embedding.android.NormalTheme"
            android:resource="@style/NormalTheme"
        />
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

        <intent-filter>
            <action android:name="androidx.health.ACTION_SHOW_PERMISSIONS_RATIONALE" />
        </intent-filter>

        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.BROWSABLE" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.LAUNCHER" />
            <data android:scheme="com.testpayment.payment" />
        </intent-filter>

    </activity>
    <!-- Don't delete the meta-data below.
         This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
    <meta-data
        android:name="flutterEmbedding"
        android:value="2" />
</application>

`

ahmedelkhyary commented 6 months ago

remove aar files. It already exists

MostafaAmerAts commented 6 months ago

@ahmedelkhyary

Working fine