Apache Cordova Android

Overview

Cordova Android

NPM

Node CI codecov.io

Cordova Android is an Android application library that allows for Cordova-based projects to be built for the Android Platform. Cordova based applications are, at the core, applications written with web technology: HTML, CSS and JavaScript.

Apache Cordova is a project of The Apache Software Foundation (ASF).

Requirements

Create a Cordova project

Follow the instructions in the Create your first Cordova app section of Apache Cordova Docs

To use a shared framework, for example in development, link the appropriate cordova-android platform folder path:

cordova platform add --link /path/to/cordova-android

Updating a Cordova project

When you install a new version of the Cordova CLI that pins a new version of the Cordova-Android platform, you can follow these simple upgrade steps within your project:

cordova platform rm android
cordova platform add android

Debugging in Android Studio

Import project in Android Studio through File > Open and targeting /path/to/your-cdv-project/platforms/android/.

How to Test Repo Development

npm install
npm test

Further reading

Comments
  • feat: Build app bundles (.aab files)

    feat: Build app bundles (.aab files)

    Platforms affected

    • Android

    Motivation and Context

    This PR adds support to build android bundle (aab) files. Fixes: #729

    Description

    ~Adds an --bundle flag to the cordova build command. If present, cordova will do the necessary steps to run the gradlew bundleDebug command (or gradlew bundleRelease if --release flag is present)~

    Accepts packageType property from build.json, or optionally the --packageType=apk|bundle command line argument. The packageType property was chosen to keep consistency with the iOS platform.

    This PR does not change the current build commands. Building APKs is still necessary for deploying apps to test devices, or of course to upload to the Google Play store using the traditional way. Bundle files are exclusively for deploying to Google Play Store.

    You can however use the google provided bundletool program to build APKs from a bundle file so this PR still provides the ability to build bundles in both debug and release variants.

    If build.json is present in the cordova project, just like building APKs, bundles will automatically be signed using the key and password as defined in build.json.

    This PR does alter a previous constraint where if a signing property is present, but is missing the required properties for signing a warning would be displayed. This was altered to only show the warning if a property for signing is present is missing the required properties for signing. In other words, if packageType is the only property defined in the build.json file, then a warning about missing required properties for signing won't be emitted.

    The cordova run android command has been modified to produce an error if packageType is set to bundle. This is because you cannot execute/deploy a bundle directly to the phone. I believe it is possible to replace all usages of the adb tool and instead use Google's bundletool, which provides tools to deploy bundle files to devices and thus support the cordova run command using bundles, but that would be another PR for another day.

    Testing

    I have done the following:

    • Added unit tests for using the --packageType flag
    • Ran npm test and ensure all tests passed (Running Node 10.x & cordova@9)
    • I installed cordova-android platform to a test app via cordova platform add https://github.com/breautek/cordova-android.git#app-bundle and manually ran build commands and all combinations of --debug, --release, and --bundle
    • I have created a test app on Google Play store to ensure that google will accept a signed aab file created by cordova build android --bundle --release.
    • I have tested app-bundle branch against one of my work projects which involves a more complicated project structure and includes the use of native libraries (crosswalk) and observed successful builds.

    Checklist

    • [x] I've run the tests to see all new and existing tests pass
    • [x] I added automated test coverage as appropriate for this change
    • [x] Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
    • [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
    • [x] I've updated the documentation if necessary

    TODO

    • [x] Additionally fallback to build.json packageType to decide whether to build an APK or bundle. Overridable by --packageType (Removing the --bundle flag)
    • [x] Update build.json documentation
    • [x] Fix the added unit test so that they are consistent (one uses withContext, the other doesn't)
    • [x] Revert devDependencies nyc and jasmine

    Crosswalk Users

    See https://github.com/apache/cordova-android/pull/764#issuecomment-534101278

    enhancement 
    opened by breautek 69
  • Support new Android App Bundle package format

    Support new Android App Bundle package format

    Feature Request

    Motivation Behind Feature

    Google recommends using the new Android App Bundle format for apps uploaded to Google Play. When you upload an APK a warning is displayed which encourages to use the newer format.

    Feature Description

    Google provides information on the new package format on: https://developer.android.com/platform/technology/app-bundle It would be great if Cordova would support this new package format out of the box or with a parameter for the build command.

    enhancement help wanted 
    opened by fortunella 54
  • Build errors about drawable since upgrading to v8.0.0

    Build errors about drawable since upgrading to v8.0.0

    Bug Report

    Problem

    What is expected to happen?

    Building a cordova app with ionic cordova build android --prod --release does not throw errors.

    What does actually happen?

    I see this error in the console:

    /platforms/android/app/src/main/res/drawable-land-hdpi/screen.png: Error: The drawable "screen" in drawable-land-hdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
    

    Information

    This error was not present in v7.X

    I do specify a splash screen in config.xml like so: <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />

    And it gets displayed correctly (according to my tests so far)

    I'm using this plugin to configure the splash screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/

    I only included 1 example of the errors I'm getting to keep the bug report small. But I get it for different screen sizes & densities.

    I understand that it has something to do with android linting rules: http://tools.android.com/tips/lint-checks

    But I don't fully understand if it's a misconfiguration in the plugin or if cordova-android needs to do something differently.

    Command or Code

    ionic cordova build android --prod --release

    Environment, Platform, Device

    On all. It happens on build time.

    Version information

    ~/Documents/komed/komed-frontend$ ionic info
    
    Ionic:
    
       ionic (Ionic CLI)  : 4.11.0 (/Users/borntsch/.nvm/versions/node/v8.13.0/lib/node_modules/ionic)
       Ionic Framework    : ionic-angular 3.9.2
       @ionic/app-scripts : 3.2.3
    
    Cordova:
    
       cordova (Cordova CLI) : 8.0.0
       Cordova Platforms     : android 8.0.0, browser 5.0.4, ios 5.0.0
       Cordova Plugins       : cordova-plugin-ionic-webview 2.3.1, (and 27 other plugins)
    
    System:
    
       Android SDK Tools : 26.1.1 (/Users/borntsch/Library/Android/sdk)
       ios-deploy        : 1.9.2
       ios-sim           : 7.0.0
       NodeJS            : v8.13.0 (/Users/borntsch/.nvm/versions/node/v8.13.0/bin/node)
       npm               : 6.4.1
       OS                : macOS Mojave
       Xcode             : Xcode 10.1 Build version 10B61
    

    Checklist

    • [X] I searched for existing GitHub issues
    • [X] I updated all Cordova tooling to most recent version
    • [X] I included all the necessary information above
    opened by BorntraegerMarc 53
  • Crash Report: ConcurrentModificationException

    Crash Report: ConcurrentModificationException

    Bug Report

    Problem

    We mentioned some Crash Reports from our App, build with [email protected]. Crashlog:

    java.util.ConcurrentModificationException: java.util.ConcurrentModificationException

    java.util.LinkedHashMap$LinkedHashIterator.nextNode LinkedHashMap.java:775
    java.util.LinkedHashMap$LinkedValueIterator.next LinkedHashMap.java:803
    org.apache.cordova.PluginManager.onResume PluginManager.java:262
    org.apache.cordova.CordovaWebViewImpl.handleResume CordovaWebViewImpl.java:452
    org.apache.cordova.CordovaActivity.onResume CordovaActivity.java:277
    android.app.Instrumentation.callActivityOnResume Instrumentation.java:1465
    android.app.Activity.performResume Activity.java:8203
    android.app.ActivityThread.performResumeActivity ActivityThread.java:4757
    android.app.ActivityThread.handleResumeActivity ActivityThread.java:4810
    android.app.servertransaction.ResumeActivityItem.execute ResumeActivityItem.java:52
    android.app.servertransaction.TransactionExecutor.executeLifecycleState TransactionExecutor.java:190
    android.app.servertransaction.TransactionExecutor.execute TransactionExecutor.java:105
    android.app.ActivityThread$H.handleMessage ActivityThread.java:2373
    android.os.Handler.dispatchMessage Handler.java:107
    android.os.Looper.loop Looper.java:213
    android.app.ActivityThread.main ActivityThread.java:8147
    java.lang.reflect.Method.invoke Method.java
    com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run RuntimeInit.java:513
    com.android.internal.os.ZygoteInit.main ZygoteInit.java:1101
    

    and

    java.util.ConcurrentModificationException: java.util.ConcurrentModificationException

    java.util.LinkedHashMap$LinkedHashIterator.nextNode LinkedHashMap.java:760
    java.util.LinkedHashMap$LinkedValueIterator.next LinkedHashMap.java:788
    org.apache.cordova.PluginManager.onPause PluginManager.java:209
    org.apache.cordova.CordovaWebViewImpl.handlePause CordovaWebViewImpl.java:435
    org.apache.cordova.CordovaActivity.onPause CordovaActivity.java:245
    android.app.Activity.performPause Activity.java:7663
    android.app.Instrumentation.callActivityOnPause Instrumentation.java:1536
    android.app.ActivityThread.performPauseActivityIfNeeded ActivityThread.java:4726
    android.app.ActivityThread.performPauseActivity ActivityThread.java:4691
    android.app.ActivityThread.handlePauseActivity ActivityThread.java:4626
    android.app.servertransaction.PauseActivityItem.execute PauseActivityItem.java:45
    android.app.servertransaction.TransactionExecutor.executeLifecycleState TransactionExecutor.java:145
    android.app.servertransaction.TransactionExecutor.execute TransactionExecutor.java:70
    android.app.ActivityThread$H.handleMessage ActivityThread.java:2199
    android.os.Handler.dispatchMessage Handler.java:112
    android.os.Looper.loop Looper.java:216
    android.app.ActivityThread.main ActivityThread.java:7625
    java.lang.reflect.Method.invoke Method.java
    com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run RuntimeInit.java:524
    com.android.internal.os.ZygoteInit.main ZygoteInit.java:987
    

    Environment, Platform, Device

    From Crashlog this happens to a Mate 20 Pro with Android 9 and a Galaxy Note10+ with Android 10 too.

    Maybe related Issue?

    • #912

    Please fix this 😊

    Checklist

    • [X] I searched for existing GitHub issues
    • [X] I updated all Cordova tooling to most recent version
    • [X] I included all the necessary information above
    bug info-needed 
    opened by EinfachHans 37
  • Back button event on full screen video closes application

    Back button event on full screen video closes application

    Bug Report

    Problem

    As the title suggests, attempting to exit fullscreen using the back button, closes the application instead of exiting fullscreen.

    1. Create a cordova application with a
    2. Enter full screen mode on video
    3. Hit back button

    What is expected to happen?

    Full screen mode should be exited.

    What does actually happen?

    Application is closed.

    Information

    From what I could gather this is in fact a problem with Chrome itself, I've seen this occur on chrome versions (at least) higher than 74.0.3729.186 up to the current stable version (76.0.3809.132).

    A bug report on chromium bug tracker was also opened

    Command or Code

    N/A

    Environment, Platform, Device

    Android, any version that uses Chrome as the webview provider and it has been updated.

    Version information

    cordova cli: 7.1.0 cordova-android: 8.0.0

    Checklist

    • [X] I searched for existing GitHub issues
    • [ ] I updated all Cordova tooling to most recent version
    • [X] I included all the necessary information above
    opened by Chuckytuh 37
  • CB-11244: Studio Project Compatibility: Now with merge commit

    CB-11244: Studio Project Compatibility: Now with merge commit

    Platforms affected

    Android

    What does this PR do?

    This PR is the new current working PR for the Studio Project work

    What testing has been done on this change?

    Tested against the CI tests, more tests need to be added.

    Checklist

    • [x ] Reported an issue in the JIRA database
    • [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    • [] Added automated test coverage as appropriate for this change.
    opened by infil00p 36
  • New BETA Version of Google Play Console show this warning: [This App Bundle contains Java/Kotlin code]

    New BETA Version of Google Play Console show this warning: [This App Bundle contains Java/Kotlin code]

    Bug Report

    Problem

    What is expected to happen?

    Google Play Console (New BETA Version) should not show warnings when you try to upload the app to Play Store.

    What does actually happen?

    When you try to upload the bundle for release using new Google Play Console (New BETA Version), the following warning message appear:

    This App Bundle contains Java/Kotlin code, which might be obfuscated. We recommend you upload a deobfuscation file to make your crashes and ANRs easier to analyze and debug. Learn More

    The app uploaded successfully and released well, but the only issue is the warning message.

    Information

    I try with preference AndroidXEnabled = false and try with true I try with preference GradlePluginKotlinEnabled = true and try with false

    Using new Google Play Console (New BETA Version)

    Command or Code

    Environment, Platform, Device

    Version information

    Cordova-cli 9.0.0 Cordova-android 9.0.0 Android Studio v4.0 Gradle 6.5 Node.js 12.8.2 Java JDK 8

    I am using only cordova plugins (using the latest version for each plugin): cordova-plugin-battery-status cordova-plugin-device cordova-plugin-dialogs cordova-plugin-geolocation cordova-plugin-inappbrowser cordova-plugin-network-information cordova-plugin-screen-orientation cordova-plugin-splashscreen cordova-plugin-statusbar cordova-plugin-vibration cordova-plugin-whitelist

    Checklist

    • [x] I searched for existing GitHub issues
    • [x] I updated all Cordova tooling to most recent version
    • [x] I included all the necessary information above
    help wanted 
    opened by mosabab 33
  • Can't find Gradle (Android Studio)

    Can't find Gradle (Android Studio)

    Bug Report

    Problem

    Could not find an installed version of Gradle either in Android Studio, or on your system to install the gradle wrapper. Please include gradle in your path, or install Android Studio.

    What is expected to happen?

    Just work. The message is wrong. Android Studio is already installed. Leave a link to the docs for this problem. Because everything is correctly setup (by the message). Also the enviroment path variables are set.

    What does actually happen?

    The Android Studio is installed and I can use it. I already installed a apk by the Studio and Flutter. But Cordova does not work.

    Information

    The whole Android enviroment and JDK 1.8 (8), Ionic, Cordova etc. are installed. I can run Android apps on my physical phone. e.g. using Flutter and the Android Studio. It's always tortuous to bring Cordova Android to get running.

    Command or Code

    ionic cordova run android

    Environment, Platform, Device

    Running Cordova 9 with native-run of Ionic 4 on Windows 10 64bit.

    Version information

    Click to expand Ionic:

    Ionic CLI : 5.2.5 Ionic Framework : @ionic/angular 4.9.0 @angular-devkit/build-angular : 0.801.3 @angular-devkit/schematics : 8.1.3 @angular/cli : 8.1.3 @ionic/angular-toolkit : 2.0.0

    Cordova:

    Cordova CLI : 9.0.0 ([email protected]) Cordova Platforms : android 8.0.0

    Utility:

    cordova-res : not installed native-run : 0.2.8

    System:

    NodeJS : v10.16.3 npm : 6.9.0 OS : Windows 10

    Checklist

    • [x] I searched for existing GitHub issues
    • [x] I updated all Cordova tooling to most recent version
    • [x] I included all the necessary information above

    Workaround

    Install Gradle manually. Maybe the latest Android Studio does not include it for external usage. Whatever... Cordova should remove it from the error text. Because it's not solved by installing the Android Studio. In my case I already had and set up the environment variables. But still not worked.

    bug help wanted 
    opened by domske 32
  • [8.0.0] Android environment variables: ANDROID_HOME vs ANDROID_SDK_ROOT - cosmetic display issue

    [8.0.0] Android environment variables: ANDROID_HOME vs ANDROID_SDK_ROOT - cosmetic display issue

    Hey @brodybits (as I remember you pushed a PR in this area), check out the output of running cordova build android on a brand new machine where I just installed Android Studio:

    E:\Projects\throwaway\cordovaAndroid8Test  ([email protected])
    λ cordova platform list
    Installed platforms:
      android 8.0.0
    Available platforms:
      browser ~5.0.1
      ios ~4.5.4
      osx ~4.0.1
      windows ~6.0.0
    
    E:\Projects\throwaway\cordovaAndroid8Test  ([email protected])
    λ cordova build android
    Checking Java JDK and Android SDK versions
    ANDROID_SDK_ROOT=undefined (recommended setting)
    ANDROID_HOME=C:\Users\Jan\AppData\Local\Android\sdk (DEPRECATED)
    Starting a Gradle Daemon (subsequent builds will be faster)
    
    ...
    

    Strange that this set ANDROID_HOME, and not ANDROID_SDK_ROOT, isn't it?

    bug version: 8.0.0 
    opened by janpio 31
  • [feature-request] change the default target sdk to (API Level 30)

    [feature-request] change the default target sdk to (API Level 30)

    Feature Request

    Motivation Behind Feature

    The latest version of Android Studio allow you to set the latest API level available which is API LEVEL 30.

    Feature Description

    It is good idea to increase the default target sdk to 30.

    Alternatives or Workarounds

    opened by mosabab 29
  • Update check_reqs.js - allow JDK > 1.8

    Update check_reqs.js - allow JDK > 1.8

    Checking JDK should not fail when there is another version installed like 11.0.6 for example. Redme file declares clearly

    Requires

    > Java JDK 1.8 or greater
    

    Motivation and Context

    I have another verison installed. It fails but shouldn't.

    bug 
    opened by dkotrada 28
  • splash size reduced in android 11

    splash size reduced in android 11

    Hello,

    After accommodating the splash screen changes in android 11, the size of the splash screen looks reduced. removed cordova-android-splashscreen plugin and added the below line in config.xml

        <preference name="AndroidWindowSplashScreenAnimatedIcon" value="resources/android/splash/universal-screen.png" />
    

    created the png by following the guidelines from this link https://developer.android.com/guide/topics/ui/splash-screen#splash_screen_dimensions

    png file dimensions are 2732 x 2732

    Thanks, Bhargav

    info-needed 
    opened by bhargavas12 2
  • The

    The "path" argument must be of type string. Received undefined

    Bug Report

    Problem

    Android build is working first time after adding android platform, but on second time it show this error "The "path" argument must be of type string. Received undefined". I can only remove and again add platform to make it work.

    What is expected to happen?

    build application without error

    What does actually happen?

    build end with error:

    ...
      copy  res/screen/hdpi/portrait.png platforms\android\app\src\main\res\drawable-port-hdpi\screen.png (updated file)
      copy  res/screen/mdpi/portrait.png platforms\android\app\src\main\res\drawable-port-mdpi\screen.png (updated file)
      copy  res/screen/xhdpi/portrait.png platforms\android\app\src\main\res\drawable-port-xhdpi\screen.png (updated file)
      copy  res/screen/xxhdpi/portrait.png platforms\android\app\src\main\res\drawable-port-xxhdpi\screen.png (updated file)
      copy  res/screen/xxxhdpi/portrait.png platforms\android\app\src\main\res\drawable-port-xxxhdpi\screen.png (updated file)
    This app does not have additional resource files defined
    Prepared android project successfully
    The "path" argument must be of type string. Received undefined
    TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
        at new NodeError (internal/errors.js:322:7)
        at validateString (internal/validators.js:124:11)
        at Object.join (path.js:424:7)
        at ConfigKeeper.get (D:\Projects\master\node_modules\cordova-common\src\ConfigChanges\ConfigKeeper.js:44:32)
        at D:\Projects\master\node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js:264:51
        at Array.forEach (<anonymous>)
        at PlatformMunger._is_conflicting (D:\Projects\master\node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js:257:21)
        at PlatformMunger.add_config_changes (D:\Projects\master\node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js:140:59)
        at D:\Projects\master\node_modules\cordova-lib\src\cordova\prepare\platforms.js:66:24
        at async Promise.all (index 0)
    
    

    Information

    System Windows 10 64bit

    Command or Code

    cordova prepare android

    Environment, Platform, Device

    Windos 10, Android 10.1.2

    Version information

    cordova platforms

    Installed platforms:
      android 10.1.2
    Available platforms:
      browser ^6.0.0
      electron ^3.0.0
      windows ^7.0.0
    

    cordova --version

    11.0.0
    

    cordova plugins

    com-darryncampbell-cordova-plugin-intent 1.1.7 "Intent Shim"
    com-intel-security-cordova-plugin 2.0.3 "APP Security API"
    com.loksir.zb 1.0.18 "zb"
    cordova-plugin-android-permissions 1.1.3 "Permissions"
    cordova-plugin-androidx-adapter 1.1.3 "cordova-plugin-androidx-adapter"
    cordova-plugin-app-version 0.1.9 "AppVersion"
    cordova-plugin-bluetooth-serial 0.4.7 "Bluetooth Serial"
    cordova-plugin-camera-preview 0.12.1 "cordova-plugin-camera-preview"
    cordova-plugin-camera 4.0.4-dev "Camera"
    cordova-plugin-cartegraph-cookie-master 1.4.1 "CookieMaster"
    cordova-plugin-console 1.1.0 "Console"
    cordova-plugin-device 2.0.3 "Device"
    cordova-plugin-dialogs 2.0.2 "Notification"
    cordova-plugin-file-transfer 2.0.0-dev "File Transfer"
    cordova-plugin-file 6.0.2 "File"
    cordova-plugin-globalization 1.11.0 "Globalization"
    cordova-plugin-media 5.0.4 "Media"
    cordova-plugin-mobile-ocr 3.1.2 "Textocr"
    cordova-plugin-ondestroy 1.0.2 "Cordova onDestroy Plugin"
    cordova-plugin-pm80-scanner 0.0.6 "PM80 Scanner"
    cordova-plugin-screen-orientation 3.0.2 "Screen Orientation"
    cordova-plugin-splashscreen 6.0.0 "Splashscreen"
    cordova-plugin-vibration 3.1.1 "Vibration"
    cordova-plugin-x-socialsharing 6.0.3 "SocialSharing"
    cordova-sqlite-legacy-build-support 1.3.5 "Cordova sqlite legacy build support"
    cordova.plugins.diagnostic 5.0.0 "Diagnostic"
    es6-promise-plugin 4.2.2 "Promise"
    phonegap-plugin-barcodescanner 8.0.0 "BarcodeScanner"
    

    Operating System: Windows 10 64bit, IDE: Vscode / IntelijIDEA

    node --version v14.18.3

    Checklist

    • [X] I searched for existing GitHub issues
    • [X] I updated all Cordova tooling to most recent version
    • [X] I included all the necessary information above
    info-needed 
    opened by rchovan 3
  • Splashscreen blinks on hide (Android 12 API 32)

    Splashscreen blinks on hide (Android 12 API 32)

    Bug Report

    Problem

    Splashscreen suddenly blinks before hide on device 32 API

    Steps to reproduce

    Simply create and launch few times clear cordova app with cordova-android@11

    Information

    ezgif-3-29d5ee817f

    Environment, Platform, Device

    MacOS Ventura 13.0

    Simulator Pixel 4 XL API 32

    Version information

    node --version
    v16.18.0
    
    cordova --version      
    11.0.0
    

    Checklist

    • [x] I searched for existing GitHub issues
    • [x] I updated all Cordova tooling to most recent version
    • [x] I included all the necessary information above
    bug 
    opened by roman-rr 12
  • Android 13 device goes to lock screen after quit app when showing splashscreen

    Android 13 device goes to lock screen after quit app when showing splashscreen

    Bug Report

    Problem

    What is expected to happen?

    Doesn't lock screen

    What does actually happen?

    Goes to lock screen when quit app at splashscreen

    Information

    Only happen with Cordova-Android@11 and Android 13 device

    Command or Code

    Environment, Platform, Device

    Cordova-Android@11 and Android 13 device

    Version information

    My Ionic info:

    Ionic:

    Ionic CLI : 6.20.3 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : ionic-angular 3.9.9 @ionic/app-scripts : 3.2.4

    Cordova:

    Cordova CLI : 11.0.0 Cordova Platforms : android 11.0.0 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 3 other plugins)

    Utility:

    cordova-res : 0.15.4 native-run : 1.7.1

    System:

    Android SDK Tools : 26.1.1 (/Users/truyenn/Library/Android/sdk/) ios-deploy : 1.9.4 ios-sim : 8.0.0 NodeJS : v14.20.1 (/usr/local/bin/node) npm : 6.14.17 OS : macOS Monterey Xcode : Xcode 13.4.1 Build version 13F100

    cordova plugin ls cordova-plugin-device 2.0.2 "Device" cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard" cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview" cordova-plugin-splashscreen 5.0.2 "Splashscreen" cordova-plugin-statusbar 2.4.2 "StatusBar"

    Checklist

    • [x] I searched for existing GitHub issues
    • [x] I updated all Cordova tooling to most recent version
    • [x] I included all the necessary information above
    opened by TruyenNV 1
  • Google Play Console: App rejected due to Intent Redirection vulnerability

    Google Play Console: App rejected due to Intent Redirection vulnerability

    Bug Report

    Problem

    Google Play Console: App rejected due to Intent Redirection vulnerability, org.apache.cordova.CordovaInterfaceImpl.startActivityForResu

    What is expected to happen?

    App should approve and publish without any issues

    What does actually happen?

    App rejects during the google play console review process

    Information

    Cordova Android application gets rejected during the play store review process. And their response is this,

    We rejected xx with package name xx, for violating our Device and Network Abuse or User Data policy. This app uses software that contains security vulnerabilities for users or allows the collection of user data without proper disclosure.

    The issue comes from this: org.apache.cordova.CordovaInterfaceImpl.startActivityForResult

    image

    The app .apk file works on Android devices without any issues.

    Command or Code

    AndroidManifest.xml

    <?xml version='1.0' encoding='utf-8'?>
    <manifest android:hardwareAccelerated="true" android:versionCode="11400" android:versionName="1.14.0" package="com.directfn.mobile.anbi_prod" xmlns:android="http://schemas.android.com/apk/res/android">
        <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
        <uses-permission android:name="android.permission.INTERNET" />
        <application android:allowBackup="false" android:debuggable="false" android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:usesCleartextTraffic="true">
            <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize"
                android:exported="true">
                <intent-filter android:label="@string/launcher_name">
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
        </application>
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
        <uses-permission android:name="android.permission.USE_FINGERPRINT" />
    </manifest>
    

    Environment, Platform, Device

    Android Google Play Console App Review

    Checklist

    • [x] I searched for existing GitHub issues
    • [ ] I updated all Cordova tooling to most recent version
    • [x] I included all the necessary information above
    opened by Binuka97 2
  • Status bar background color overridden by the splash screen animation on Android 13

    Status bar background color overridden by the splash screen animation on Android 13

    Bug Report

    Problem

    On Android 13 the status bar background color is always black. I've set the color on the config.xml with the StatusBarBackgroundColor preference and it works on ios and android < 13 but not on Android 13.

    What is expected to happen?

    Status bar should have the color set in the config.xml.

    What does actually happen?

    Status bar color is black. It shows the correct color for a few milliseconds than it becomes black.

    Information

    Just set the background color with StatusBarBackgroundColor in the config.xml and run the application on Android 13.

    Command or Code

    <preference name="StatusBarBackgroundColor" value="#cccccc" /> in config.xml This issue is solved removing the splash screen animation from the splash screen plugin: image so the splash screen plugin should fix this part of the code.

    Environment, Platform, Device

    Android 13, Android studio 2021.2.1 patch 2

    Version information

    cordova cli v 11.0.0 cordova-android v 11.0.0 cordova-plugin-statusbar v3.0.0

    Checklist

    • [x] I searched for existing GitHub issues
    • [x] I updated all Cordova tooling to most recent version
    • [x] I included all the necessary information above
    opened by gmilof 9
Owner
The Apache Software Foundation
The Apache Software Foundation
Klimatic is an android app built using Kotlin. It try to showcase all the latest technologies used in android.

Klimatic Klimatic is an android app built using Kotlin. It try to showcase all the latest technologies used in android. Built using Android Architectu

Shivam Satija 34 Oct 11, 2022
Oratio Library for Android Studio helps you simplify your Android TTS codes

Oratio Oratio is a library for Android Studio. This library is useful to a number of developers who are currently making apps using android TTS(Text-T

Jacob Lim 1 Oct 28, 2021
This is a demo android app representing implementation of SE principles in android app development

Articles Demo This repository contains a sample Android App that shows most popular articles data from NY Times API. This is a sample app that shows h

Waesem Abbas 2 Jan 20, 2022
Android-Boilerplate - Base project for android development with new technology

Android-Boilerplate Base project for android development with new technology, in

Muhammad Rizky Arifin 1 Aug 15, 2022
Gits-android-extensions - A collection of Kotlin extensions to simplify Android development

gits-android-extensions A collection of Kotlin extensions to simplify Android de

GITS Indonesia 3 Feb 3, 2022
Android Clean Architecture in Rorty is a sample project that presents modern, approach to Android application development using Kotlin and latest tech-stack.

Android Clean Architecture in Rorty is a sample project that presents modern, approach to Android application development using Kotlin and latest tech-stack.

Mr.Sanchez 176 Jan 4, 2023
Android Ptrace Inject for all ABIs and all APIs. Help you inject Shared Library on Android.

Android Ptrace Inject 中文可以参考我的注释内容进行理解 我写的注释相对来说比较全面了 How to build Make sure you have CMake and Ninja in your PATH Edit CMakeLists.txt. Set ANDROID_ND

SsageParuders 65 Dec 19, 2022
Pleasant Android application development

⚠️ Anko is deprecated. Please see this page for more information. Anko is a Kotlin library which makes Android application development faster and easi

Kotlin 15.9k Jan 5, 2023
YouTube Player library for Android and Chromecast, stable and customizable.

android-youtube-player android-youtube-player is a stable and customizable open source YouTube player for Android. It provides a simple View that can

Pierfrancesco Soffritti 2.9k Jan 2, 2023
A highly customizable calendar library for Android, powered by RecyclerView.

CalendarView A highly customizable calendar library for Android, powered by RecyclerView. With this library, your calendar will look however you want

Kizito Nwose 3.4k Jan 3, 2023
View "injection" library for Android.

Kotter Knife Deprecated: This was a terrible idea because it allocates an object for every view reference. Do not use, and do not use anything like it

Jake Wharton 2.2k Dec 28, 2022
Android library that creates app shortcuts from annotations

Shortbread Android library that generates app shortcuts for activities and methods annotated with @Shortcut. No need to touch the manifest, create XML

Matthias Robbers 1.8k Dec 30, 2022
Android + Kotlin + Github Actions + ktlint + Detekt + Gradle Kotlin DSL + buildSrc = ❤️

kotlin-android-template ?? A simple Github template that lets you create an Android/Kotlin project and be up and running in a few seconds. This templa

Nicola Corti 1.5k Jan 3, 2023
🛠️ The missing drawable toolbox for Android. Create drawables programmatically and get rid of the boring and always repeated drawable.xml files.

DrawableToolbox English | 中文 The missing DrawableToolbox for Android. Create drawables programmatically and get rid of the boring and always repeated

Hong Duan 1.1k Jan 4, 2023
Kotlin library for Android

KAndroid Kotlin library for Android providing useful extensions to eliminate boilerplate code in Android SDK and focus on productivity. Download Downl

Paweł Gajda 890 Nov 13, 2022
📒 NotyKT is a complete 💎Kotlin-stack (Backend + Android) 📱 application built to demonstrate the use of Modern development tools with best practices implementation🦸.

NotyKT ??️ NotyKT is the complete Kotlin-stack note taking ??️ application ?? built to demonstrate a use of Kotlin programming language in server-side

Shreyas Patil 1.4k Jan 4, 2023
Android sliding panel that is part of the view hierarchy, not above it.

sliding-panel A ViewGroup that implements a sliding panel that is part of the view hierarchy, not above it. Difference from other libraries All other

Pierfrancesco Soffritti 441 Nov 12, 2022
{ } Declarative Kotlin DSL for choreographing Android transitions

Transition X Kotlin DSL for choreographing Android Transitions TransitionManager makes it easy to animate simple changes to layout without needing to

Arunkumar 520 Dec 16, 2022
:bouquet: An easy way to persist and run code block only as many times as necessary on Android.

Only ?? An easy way to persist and run code block only as many times as necessary on Android. Download Gradle Add below codes to your root build.gradl

Jaewoong Eum 479 Dec 25, 2022