Splash screen in JWS - java

I have java web start application which loads very slow. When I run it, first I see just splash screen, then splash screen disappear and I have to wait for loading my application. That is the moment when splash screen disappear and application doesn't run yet and I do not know if application is loading (because everything process in background). So my question is -> do I have any opportunity extend time of availability of splash screen or just run some information like label/frame/window instead of splash screen which will inform user application is loading and no need to start app again but just wait? Can I do that in jnlp? Or separated lauch file, which is independent from my app? I do not want modify my app

Related

is it compulsory splash screen must have its own java file, xml file and manifest??

I am an Amateur android developer.. I av got a question... Is it compulsory splash screen must have its own java file, xml file and manifest? Does it need to create another files for the splash screen apart from default xml and java files on android studio?
If you really need a splash screen then yes, you would need these files (java+xml, and the definition of the activity in the manifest).
You can use the "new Activity" menu to create the java+xml files as well as the manifest entry for you splash screen activity.
Like any other layouts, Splash Screen is just another layout and it needs XML to define the layout and its looks. It also needs Java to launch at the start and to bind that layout. Manifest is used to define this Java class's meta data as a Launcher activity.
However, Android apps do take some amount of time to start up, especially on a cold start. Don’t waste the user’s time, but don’t show them a blank, unconfigured section of the app the first time they launch it, either.
Ideally, a splash screen should be displayed as long as the app is loading in the background and configure itself.
The splash view that you see has to be ready immediately, even before you can inflate a layout file in your splash activity. So you will not use a layout file. Instead, specify your splash screen’s background as the activity’s theme background. You can check how to implement it the right way here.

How to force java web start to start the splash screen and later window on same display monitor with IE

Scenario: Laptop has multiple monitors, use projector as second monitor.
Bring IE to the projector monitor, type jnlp path to start the java web start, but the Java splash screen (for first time, later time it will show application's splash window) shown on laptop own monitor (first monitor of the system). And so is the later window of the java web start application. I need to manually drag the window but the audience missed the splash window.
Question: is there a way to tell javaws to show Java splash screen, and application splash screen for future to appear on the same display with the browser that started it? Also, how to let the java application to know which display it was on since the user might put IE on any monitor he has?
The JWS splash, unlike the AWT based SplashScreen, does not provide any programmer control. So the answer to your question is 'it cannot be done'.
Answering your question partially, you can change your splash screen through in the JNLP file changing the icon tag attributes.
References.
http://docs.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/faq.html#206
https://blogs.oracle.com/thejavatutorials/entry/changing_the_java_web_start

Can we add a wallpaper for the class extending android.app.Application?

I am loading some required resources in a global class which extends Application.
Since it runs first as soon as we launch the application, it takes some time to start first activity which results in blank screen for few seconds during launch.
Can we add a wallpaper or a gif which displays that the application is loading instead in place of blank screen?
If yes, please help me out how to start with?
You can set a background image in your layout, then if you need to load huge information when started your application, you can load this info in background using asynctask or service or thread.

How to Access Splash Screen Specified in JNLP?

I have specified splash picture in jnlp application
<icon href="starter.png" kind="splash"/>
When I use IE to run the jnlp, the splash window showed up, but my application can't access the splash. I have used the static variable to obtain the instance:
private static SplashScreen splash = SplashScreen.getSplashScreen();
in main(), I first check whether splash is null, and unfortunately, it is null. Then why can I see it for a few seconds? Did Java Web Start window closed it?
If I run application (not jnlp) in Eclipse with vm arguments then I can access the splash screen and update my slow loading process.
How do I access the splash screen using jnlp?
The splash screen as used by web start predates the AWT SplashScreen API & is not compatible with it.
How do I access the splash screen using jnlp?
It cannot be accessed.
..it looks like I have to pop up a window to show the picture.
I'd say that is the only option.
..But that way there is no way to show transparency with the splash screen at least before Java 7, right?
Correct. Given that..
..I mean, I don't want to use the reflection either.
..well, reaching into Sun(/Oracle) private classes is not necessarily 'reflection', I guess that is your worry, and that worry is well founded. Either give up on a partially transparent splash, or wait for Java 7.
But then, gotta' comment, I've never before seen a semi-transparent splash. If a splash is worth showing, why not show it at full opacity?

buttons ontop of everything in android

I am currently working on a calculator application for android. I am finding it difficult to conveniently take a screen shot of the app. So i have put my calculator on pause so I can write a simple screen shot app. It runs in the notification bar and when you click the notification the notification bar slides away and a few seconds later a snapshot is taken. This works perfectly. Now I would like to add functionality to take snapshots even for full screen apps. I have seen apps that put a sliding drawer on the screen onto of whatever app is running. That is there is always a button on the screen no matter what you are doing that when you click/drag it that sliding drawer came out. How did they do that? It should be a simple process to use a button instead of a drawer and when it's clicked hide it, snapshot and unhide it.
So my question bsically is
How can i put a usable button on the screen that stays above whatever app is running, even the homescreen
I realize I'm not answering your question directly, but if you simply want to get a screen capture of your application running, I would use ddms in your android tools directory. It has a menu option for getting a screen grab. I use it frequently.
Just go to Device > Screen Capture
More details here :
http://developer.android.com/guide/developing/debugging/ddms.html

Categories