splash screen is not showing on android - android

i have really searched about the problem but didn't find the correct solution that's why again here..
i have a Ionic+ Cordova project i want to show Splash Screen on android. project include a
res folder and inside that a drawable folder where i have placed my screen.png which i want to show.
but the problem is the file is not showing .
what is the problem how to show
i have include below line of code in config.xml which is inside of root folder
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="20000" />
<preference name="auto-hide-splash-screen" value="false" />
and my splash screen is here
platforms/android/res/drawable/screen.png
before app load a black than white backgound shows..

You need to install the splashscreen plugin in order to use it.
You can write the preferences in the config.xml, but I would recommand to do use the platform tag. Also make sure that you provide a splashscreen for each resolution in the drawables folder
<platform name="android">
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="1500" />
</platform>

Did you add the SplashScreen to AndroidManifest.xml ?

Related

How do target an API level for android from config.xml for phonegap?

I used to build apps with the basic config.xml file for phonegap for play store until recently when my apps were being rejected because they did not target API level 26. I did some research and and tried a few solutions and did this:
<platform name="android">
<allow-intent href="market:*" />
<preference name="android-minSdkVersion" value="26" />
<preference name="android-targetSdkVersion" value="26" />
</platform>
which went from bad to worse, my apps in debug mode (after xompilation on phonegap build) won't even be parsed on android anymore.
I have equally read a couple of solutions but none seems to walk. I really just want to know what I should be including into the config.xml file so that I can going anew.
My config.xml file has these two lines but they are placed outside of
<platform name="android"></platform>
Here are the values that I use and my app is live on both Apple and Google app store:
<preference name="android-targetSdkVersion" value="26" />
<preference name="android-minSdkVersion" value="14" />
Let me know if you want an example of my full config.xml file! :)

Cordova Webview and Splashscreen dont work

I installed Cordova plugin:
cordova-plugin-crosswalk-webview
Everything works fine with this plugin, but then I installed
cordova plugin add cordova-plugin-splashscreen
for creating splashscreen. In file config.xml in widget section I put this code:
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="5000" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="ShowSplashScreenSpinner" value="false" />
Build was successful. After start application it shows splashscreen (for 5 second), but when splashscreen is disappear, it shows just white page instead my app. After I remove webview plugin - everyting works fine. How can I fix that problem?

Splashscreen spinner change color

I am building an android webapp using cordova and framework7 for an existing drupal site. I'm currently using cordova-plugin-splashscreen for the app's spashscreen. I am able to enable or disable the spinner but not change the color of it.
I want to change the color of the spinner and also change the position to bottom of the screen.
I have tried the solution in this
link, but its not working. please don't mark this as duplicate and give a solution.
This is the part where i include the spinner in config.xml
<preference name="loadUrlTimeoutValue" value="700000" />
<preference name="ShowSplashScreenSpinner" value="true"/>
<preference name="SplashScreenSpinnerColor" value="#242424"/>
<plugin name="cordova-plugin-splashscreen" spec="~3.2.2" />
<engine name="android" spec="~6.0.0" />
Note: In the cordova site, the SplashScreenSpinnerColor preference is given as a quirk for windows.

config.xml vs AndroidManifest.xml?

In Cordova/Android, what's the difference between:
/appname/config.xml
/appname/platforms/android/AndroidManifest.xml
Which one do I edit, or do I edit them both?
I'm looking to do things such as:
force portrait mode (I found this setting in config.xml)
specify minimum sdk supported for android. (I found this setting in AndroidManifest.xml)
You support to modify at /appname/config.xml
When you add a platform, ionic will regenerate /appname/platforms/android/AndroidManifest.xml file for you to build android app. So, it will collect the permission from your plugin and config.xml to build AndroidManifest.xml
Only update config.xml (not AndroidManifest.xml as it gets generated whenever you do a build)
For example to do portait add in config.xml:
<preference name="orientation" value="portrait" />
And to set minimum sdk add in config.xml:
<platform name="android">
<preference name="android-minSdkVersion" value="19" />
</platform>

Cordova Splashscreen does not work with Intel XDK

I activated the splashscreen plugin, created 9patch files and inserted them into the assets. What is more, I added this..
<preference name="SplashScreenDelay" value="10000" />
<preference name="SplashMaintainAspectRatio" value="true" />
to my intelxdk.config.additions.xml file and use
navigator.splashscreen.hide();
in my onDeviceReady event.
The splashscreen does not show anyway, when I build the app with Crosswalk.
What am I doing wrong? It would be nice, if you could help me with that.
Thx in advance.

Categories

Resources