I've created a new app with Meteor (1.2.1). If I start it once I get a splash screen. Then I stop my app with
navigator.app.exitApp();
and if I start it again, there is a white screen instead of the splash screen.
The Problem should be reproducible for anyone. Create a new blank meteor app and run it on your android device. If you start it the first time you will see the meteor splash screen and if you close the app (with the back button on your device) and start it a second time you will get a white screen instead.
In older versions of meteor (1.1.0.2) I had no such problem.
Have anyone a solution how I can get the splash screen every single time.
(I've tested it with Samsung S4 Mini and HTC Evo 3d)
I've found a workaround for my problem.
I've added an older release of cordova-plugin-splashscreen to my project. From https://github.com/apache/cordova-plugin-splashscreen/releases
# version 2.0 (current version is 2.1)
meteor add cordova:cordova-plugin-splashscreen#https://github.com/apache/cordova-plugin-splashscreen/tarball/d23ea4e01162a78f692bb246776f2a5b3a1da14b
I run into the same issue, after look at the PhoneGap document, I found it's a default behaviour for phonegap splash screen plugin. You can see it here
"SplashShowOnlyFirstTime" preference is also optional and defaults to true. When set to true splash screen will only appear on application launch. However, if you plan to use navigator.app.exitApp() to close application and force splash screen appear on next launch, you should set this property to false (this also applies to closing the App with Back button).
So all you need to do is add this into your mobile-config file
App.setPreference('SplashShowOnlyFirstTime', 'false');
Related
I have a flutter app I am developing. When I run the app in debug mode it works really well. However when i export the APK version there's a very weird thing that happens. When I tap on the app to open it, sometimes it loads well with the splash screen and everything displays correctly.
Other times when I tap on the app icon it loads without the splash screen and the whole app is a mess.
The screenshots above, the first image is the result when the splash screen loads (hence giving time for resources to be loaded). The second image is when the splash screen is skipped, it still takes the same time to display the app content but then with no resources loaded and no styling.
I have no idea why this happens as it only happens when I export the app as an APK.
Have you tried running the app with
flutter run --release
Or you could run the app (with the exported apk) and run
flutter attach
This will show the app logs while running
Have you build apk release ?
try to build release app by run
flutter build apk --release
If your problem is not solved Share your project file or github link to better understand your problem and solve it for you
I am using the new Splash Screen implementation as Google documentation says:
https://developer.android.com/guide/topics/ui/splash-screen
Also I did the migration on my existing Splash Screen
https://developer.android.com/guide/topics/ui/splash-screen/migrate
The problem is just with the first install, my app do not show the animated vector drawable and neither the vector icon for exit animation, so it just navigates to the home screen.
But if I exit from my app and I open again, then the behavior is perfect, so it shows the AVD and also the exit animation. I also tried cleaning data from my app just to simulate a clean install, and it performs well. It just fail if I delete my app and installing again.
Some added considerations:
If I use a physical device under Android 12 (I tried Android 9), it performs well
I use splashScreen.setKeepOnScreenCondition(() -> true) at onCreate, and I use splashScreen.setKeepOnScreenCondition(() -> false) when I dismiss the Splash Screen
I made a splash screen for my android app - therefore I followed the 3 steps described here https://stackoverflow.com/a/15832037/7589266
As I didn't like the result, I directly reversed the 3 steps. But the splash screen still showed up. Furthermore, I deleted the app from my smartphone, cleaned the project and rebuilt it. If I run the code now on the emulator, there doesn't show up a splash screen, but it still does on my physical device.
Does anyone have an idea how to fix this?
I have created few Sencha touch 2.3 apps and packaged them for Android and iOS using Cordova.
One issue that I have not been able to resolve is, when you launch the app, you will see a black screen after which your Splash screen appears. Has anyone managed to solve this issue? I would like to directly show the splash screen without the black screen in between. This happens on Android.
Also, even if you create a starter app using sencha app generate... If you try to package that app, it takes minimum of 4 seconds before your view is loaded and displayed. Is there any way to speed up this? When the skeleton app takes 4 seconds to load, you can imagine other real apps that are bigger in size, they take 6-8+ seconds to load !
Use the splashscreen plugin from Cordova and hide it after 250ms of the launch of your app.
basically inside the app.js - launch:
var browserEnv = Ext.browser.is;
if (browserEnv.WebView && browserEnv.Cordova) {
Ext.defer(function () {
Ext.device.Splashscreen.hide();
}, 250);
}
Your problem with start time of the app:
I do not have this, as my empty apps start within 2 seconds therefore you might want to check on the size of your app and resources.
What is the size of your apk. If it is larger than 0.45 MB for an empty you definately want to look into it.
I have built a few Android phonegap applications using Eclipse but when I run those applications on device (mobile/emulator):
It will display a blank black screen at the initial
It will display a black blank screen for few seconds before navigating to another page.
I've same problem previously. I solved by turn android:hardwareAccelerated to false in AndroidManifest.xml
If you upgrade to PhoneGap 1.3 the black screen between pages has been removed. We used to load each page in it's own activity but that is no longer the case.