com.github.axet.desktop.os.mac
Class Apple
java.lang.Object
com.github.axet.desktop.os.mac.Apple
public class Apple
- extends Object
|
Constructor Summary |
Apple()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Apple
public Apple()
setUrlType
public static void setUrlType(String s,
String bundleId)
- Sets the user’s preferred default handler for the specified URL scheme.
URL handling capability is determined according to the value of the
CFBundleURLTypes key in an application’s Info.plist. For information on
the CFBundleURLTypes key, see the section “CFBundleURLTypes” in OS X
Runtime Configuration Guidelines.
Browser will open your app, when uses clicks on the web page url (magnet
url for example).
- Parameters:
s - - URL scheme, ex: "magnet" for "magnet://some_magnet_link"bundleId - - bundle id
setFileType
public static void setFileType(String s,
String bundleId)
- Sets the user’s preferred default handler for the specified content type
in the specified roles.
Call LSCopyDefaultRoleHandlerForContentType to get the current setting of
the user’s preferred default handler for a specified content type.
It helps browser to show proper download dialog which asks user which App
to use to open this file you are downloading.
- Parameters:
s - contenet handler. ex: "org.bittorrent.torrent", "torrent"bundleId - - bundle ID
isAvailable
public static boolean isAvailable()
setOpenFileHandler
public void setOpenFileHandler(Apple.OpenFilesHandler o)
appReOpenedListener
public void appReOpenedListener(Apple.AppReOpenedListener r)
setQuitHandler
public void setQuitHandler(Apple.QuitHandler q)
setOpenURIHandler
public void setOpenURIHandler(Apple.OpenURIHandler q)
setAboutHandler
public void setAboutHandler(Apple.AboutHandler ee)
Copyright © 2012. All Rights Reserved.