launch

Know if the user launched an app

放肆的年华 提交于 2019-12-01 13:40:21
Alright, this title might seem strange, but bear with me. I have an app which can be set on its preferences by the user to launch at login. That means I can expect sometimes the app will be launched by the user (clicking on the Dock/Finder, etc), but some other times the app will be launched automatically by the system, on login. I would like to show a window when the app is launched by the user, but not when it is launched automatically (as I imagine that would be a pain for the user). How can I do that? Although it may depend on how you intend to automate the launch of the app, you could use

launching and closing a native browser that points to web app

為{幸葍}努か 提交于 2019-12-01 13:11:44
Hello good Stack Overflow people, I do have a business problem and would like to get some answers/pointers/ideas on how to go about solving it. perhaps this has been mentioned in some other topic but so far I searched the internet but not able to find a straight answer.. Business Problem: One of our clients would like to have a Java web based application but launched as a desktop application. i.e. the client would like to double click on an icon some where on their desktop and get a browser window launched pointing to the URL/context of the web application which will be running locally on a

Start activity only once

落爺英雄遲暮 提交于 2019-12-01 08:56:43
I want my app to start a activity only the first time the app launches. Any one got any idea? I found this but it only shows a black screen. public class WhatsNew extends Activity { public static final String PREFS_NAME = "MyPrefsFile"; protected void onCreate(Bundle state){ super.onCreate(state); SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0); boolean dialogShown = settings.getBoolean("dialogShown", false); if (!dialogShown) { // AlertDialog code here SharedPreferences.Editor editor = settings.edit(); editor.putBoolean("dialogShown", true); editor.commit(); } } } When the

Launching app in landscape orientation causes rotation on launch

試著忘記壹切 提交于 2019-12-01 08:33:05
问题 I have implemented shouldAutorotateToInterfaceOrientation and everything works fine in terms or orientation changes in my app once it is running. However I don't like the behavior of my app when it is fist launched. When I launch my app in portrait orientation, it opens as expected, however when I launch my app in landscape orientation, I see everything load in portrait orientation (including the status bar), then I see an animation of my screen rotating to landscape. That animation is fine,

Detect if an app is started/resumed from 'outside' the app

*爱你&永不变心* 提交于 2019-12-01 06:28:44
I'm currently concepting a feature for an app, where I'd like a general method/approach to detect if the app itself was started or resumed from ' outside ' the app. ' Outside ', in this case, means: app was started/resumed by the launcher icon app was started/resumed by pressing the 'app button' from a navigation bar/key (like on a nexus 7) app was started/resumed from a notification app was started/resumed from 'somewhere else' The use case for this feature is the following: The app has a 'multi-user-ability' that allows the user(s) to create one ore more profiles for his/her data A single

Start activity only once

蹲街弑〆低调 提交于 2019-12-01 05:47:41
问题 I want my app to start a activity only the first time the app launches. Any one got any idea? I found this but it only shows a black screen. public class WhatsNew extends Activity { public static final String PREFS_NAME = "MyPrefsFile"; protected void onCreate(Bundle state){ super.onCreate(state); SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0); boolean dialogShown = settings.getBoolean("dialogShown", false); if (!dialogShown) { // AlertDialog code here SharedPreferences

Detect if an app is started/resumed from 'outside' the app

本秂侑毒 提交于 2019-12-01 04:22:01
问题 I'm currently concepting a feature for an app, where I'd like a general method/approach to detect if the app itself was started or resumed from ' outside ' the app. ' Outside ', in this case, means: app was started/resumed by the launcher icon app was started/resumed by pressing the 'app button' from a navigation bar/key (like on a nexus 7) app was started/resumed from a notification app was started/resumed from 'somewhere else' The use case for this feature is the following: The app has a

Custom URL Scheme for Settings on iOS 10?

☆樱花仙子☆ 提交于 2019-12-01 04:04:19
Any Idea what happened to the Setting's Custom URL Scheme on iOS 10? Is Apple still giving acess to third-pary apps to launch iOS Settings from the app via URL Scheme on iOS10? The Old URL scheme are not working anymore! None of the previous methods for launching the root "Settings" app on iOS 8+ were officially supported by Apple, so unfortunately we can't rely on them. It's also possible that apps that relied on the undocumented behaviors could be rejected during App Store review, even if others have been approved--even if the same app had been previously approved! I've been unable to

Launch file from Java

帅比萌擦擦* 提交于 2019-12-01 03:47:40
I want to launch a file(a document) from a Java program and phase the following requirements: Method must be applicabale on Mac, Win and Linux systems I am not allowed to use "Runtime.getRuntime().exec("cmd.exe /C +"filename"); The file I am launching needs to be either of .doc / .docx / .rtf The file is created runtime, a result from a report being created. Any good practices? Joonas Pulakka Use Java Desktop API . Desktop.getDesktop().open(new File(yourfilename)); If you're running 1.6, use the Desktop API per mad-j's advice. If you're using an older VM (1.5 or earlier) you'll need to write

Custom URL Scheme for Settings on iOS 10?

萝らか妹 提交于 2019-12-01 01:20:03
问题 Any Idea what happened to the Setting's Custom URL Scheme on iOS 10? Is Apple still giving acess to third-pary apps to launch iOS Settings from the app via URL Scheme on iOS10? The Old URL scheme are not working anymore! 回答1: None of the previous methods for launching the root "Settings" app on iOS 8+ were officially supported by Apple, so unfortunately we can't rely on them. It's also possible that apps that relied on the undocumented behaviors could be rejected during App Store review, even