Vladimir Dmi

Greenhorn
+ Follow
since Apr 20, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vladimir Dmi

I'm developing an application that should add it's shortcut to home screen after installation and remove it after the application is being uninstalled. The application will be preinstalled on the end user device, but still should have an option for uninstall). The task looks very simple but I've faced lots of troubles implementing it.

What I have done:
  • Add shortcut to the home screen using com.android.launcher.action.INSTALL_SHORTCUT on app first launch or on newt device reboot.
  • MANUALY remove shortcut using com.android.launcher.action.UNINSTALL_SHORTCUT.

  • What I can't (and almost giving up):
    Automaticaly remove the shortcut when the application is being uninstalled. There's not way to use Intent.ACTION_PACKAGE_REMOVED because the application being uninstalled does not receive this intent.

    I performed some tests and found out that the only shortcut type that is being removed with the application is the shortcut that is created from menu 'Add to home screen => Shortcuts => Applications => Application activity'. The shortcuts that are being created programatically or that are declared in AndroidManifest remain on home screen after the app is uninstalled.
    There's almost none docs and posts on forums about this topic and I'm confused a little bit why such a simple operation that doesn't contradict with the Android security policy could not be implemented in a straight way.

    Is there any way to ask OS to remove the corresponding shortcut on application uninstall?
    Can I catch the event that the application is being uninstalled before it is removed?
    14 years ago
    There are some problems with running applets that use 32 bit jni libs in Safari (64 bit by default). It could be easily overcame by setting the "open in 32 bit mode" in Safari application "Get Info" dialog but there's no way to switch it programmatically. So, those who are using 32 bit only drivers or codecs in their applets cannot move to Snow Leopard yet.
    14 years ago

    Ulf Dittmer wrote:You can set applet runtime parameters in the "Java Preferences" app. On my system it's in the Application/Utilities/Java/J2SE 5.0 folder, but YMMV.


    Setting this localy is not a problem, the problem is to set this parameter for all users by default from the applet, i.e. the user don't have to change anything on his PC to the applet.
    14 years ago
    I am developing heavy multimedia applet for the Mac which displays videos several and uses 2D animation.

    Because of low performance of Sun renderer on Leopard (while scaling images, drawImage(), etc.) I have to use Quartz rendered instead (on Tiger it is enabled by default). It works fine on stand-alone client version - I use "-Dapple.awt.graphics.UseQuartz=true" to force using the Quartz.
    In the applet there is a problem with setting this property to true. If I call System.setProperty("apple.awt.graphics.UseQuartz", "true"); it sets the property and getProperty afterwards returns true, but there is no effect, applet continue using Sun default renderer.
    I tried to call setProperty from init() and from static block - but both don't work.

    Can anybody advice how to force the applet to use Quartz renderer?

    Important detail: the applet is signed.

    My configuration is:
    iMac 4,1 (Intel Duo 1.8, Radeon x1600), the same problem is also on MacBook
    Mac OS X 10.5.6 (Leopard)
    Java: 1.5.0_16

    Thanks, Vladimir
    14 years ago