0

I developed an Ionic application, which works fine in an Android version other than android version 6.0.1 (Marshmallow), Android 4.4 (KitKat) and Android 7.1(Nougat).

It shows a white screen after the splash screen loads. I refer some of the link but no luck. These are the links, which I referred:

cli packages: (C:\Users\ADMIN\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

Cordova Platforms : android 7.0.0
Ionic Framework   : ionic1 1.0.0-rc.2

System:

Node : v8.11.3
npm  : 5.6.0
OS   : Windows 10

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : legacy

Plugin:

  1. cordova-plugin-compat 1.2.0 "Compat"
  2. cordova-plugin-console 1.1.0 "Console"
  3. cordova-plugin-device 1.1.6 "Device"
  4. cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
  5. cordova-plugin-keyboard 1.1.5 "Keyboard"
  6. cordova-plugin-network-information 1.3.3 "Network Information"
  7. cordova-plugin-splashscreen 4.0.3 "Splashscreen"
  8. cordova-plugin-statusbar 2.2.3 "StatusBar"
  9. cordova-plugin-whitelist 1.3.2 "Whitelist" 10 . cordova-plugin-x-socialsharing 5.1.8 "SocialSharing"
  10. cordova-plugin-x-toast 2.6.0 "Toast"
  11. es6-promise-plugin 4.1.0 "Promise"

config.xml file

<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<allow-intent href="market:*" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="SplashScreenDelay" value="2000" />
<preference name="FadeSplashScreenDuration" value="1000" />
<preference name="SplashScreen" value="screen" />
<preference name="ShowSplashScreenSpinner" value="true" />
<preference name="AutoHideSplashScreen" value="false" />

run function in app.js

.run(function($ionicPlatform, $rootScope, $timeout, $ionicLoading, $ionicPopup, $ionicHistory, $state) {
  $ionicPlatform.ready(function() {
    navigator.splashscreen.hide();
    if (window.Connection) {
      if (navigator.connection.type == Connection.NONE) {
        var alertPopup = $ionicPopup.alert({
          title: 'No Internet Connection!',
          template: 'Sorry, no Internet connectivity detected. Please reconnect and Try again.'
        });
        alertPopup.then(function(res) {
          ionic.Platform.exitApp();
        });
      }
    }
    if (window.cordova && window.cordova.plugins.Keyboard) {
      cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
    }
    if (window.StatusBar) {
      StatusBar.styleDefault();
    }
  });
})

Please help me with this. I was struggling to solve this issue for a week.

Sam
  • 149
  • 4
  • 15
  • We faced the similar issue and our question is here: https://stackoverflow.com/questions/55244225/ionic-application-is-not-working-on-4-4-and-5-1 – Ghulam Akbar Mar 19 '19 at 15:31
  • Check your min-sdk and also remove some of the plugin(trial and error method) – Sam Mar 21 '19 at 12:49

1 Answers1

0

try to add again all the plugins that you have added in project.Then again rebuild app.

  • Still same result – Sam Jul 25 '18 at 06:44
  • @ Santhosh K N add this to your AndroidManifest file. – Priyanka Jethwa Jul 25 '18 at 06:57
  • @ Priyanka Wagh, thanks for your valuable suggestion. " " not working. But i need to share something. I started revert my codebase. Then i found the solution. When i remove the below function from my service.js file it working file. – Sam Jul 25 '18 at 09:20
  • .factory('PopupMessage', function($ionicPopup, ){ return{ confirmMessage:function(message){ var confirmPopup = $ionicPopup.confirm({ title: 'Dear User', template: message, scope: null, buttons: [{ text: 'OK', type: 'button-calm', onTap: function(e) { return false; } }] }); }, } }) – Sam Jul 25 '18 at 09:21
  • @ Priyanka Wagh, is there any suggestion about above function please share. – Sam Jul 25 '18 at 09:22
  • .factory('PopupMessage', function($ionicPopup){ return{ confirmMessage:function(message){ var confirmPopup = $ionicPopup.confirm({ title: 'Dear User', template: message, scope: null, buttons: [{ text: 'OK', type: 'button-calm', onTap: function(e) { return false; } }] }); } } }) try this@ Santhosh K N – Priyanka Jethwa Jul 25 '18 at 09:36