Making your app a "default app" in webOS | webOS Nation

Making your app a "default app" in webOS 12

by Derek Kessler Thu, 29 Jul 2010 11:09 am EDT

Internalz, the default app Developers and users alike have all noticed this “Default Apps” option in the webOS launcher. Right now the only out-of-the-box option users are presented with is a choice of Google Maps or their carrier’s navigation solution (if applicable) for the default mapping software. But below the defaults for web, email, and phone, there’s a long list of file types and the default app used to open them (PDFs opened by PDF View, .WAV opened by Music, and so forth).

When the Default Apps scene appeared back in November with webOS 1.3.1, and was enabled with 1.3.5 a month later, we were all aflutter as to what that could mean for webOS. Pick your own third party dialer app (Google Voice), web browser, and more? That’d be grand. Sadly, Palm has yet to release an API for developers to set their app as an option for default apps, but that hasn’t stopped Jason Robitaille and Rod Whitby from hacking their way onto the Default Apps screen.

The addition of service calls registers an app with the Default Apps service, selecting the app as the default when no other apps present open that file type, and setting it as an option when there are already apps that open said file. For example, Robitaille’s Internalz app is registered as the default app for more than twenty different file types, and appears as an option for .TXT, with Doc View as the other and default choice. Tap on the file type, select the new apps, back swipe, and you’re good to go.

Jason does note that it's not entirely stable (thus Palm not publishing the API), and that some not-all-that clean "mimetype" registering to get Internalz to be an option for file types already defaulted by another app (e.g. a PDF viewer app would have to masquerade as PDF View to trick Default Apps into giving it the option).

Of course, it’s worth noting that because Palm has not released the APIs to performing these service calls, any app submitted (be it to the App Catalog, beta, or web distribution feeds) will be automatically and summarily rejected. But that’s not to stop developers from wishing, hoping, dreaming, and preparing. And releasing via homebrew... nudge nudge, wink wink.

Source: MetaViewSoft


Thanks for the info...

Cool. Lets hope that Palm makes this an official API. I get a ton of requests to make NaNplayer the default music player.

Of course, I'd rather see those media indexing APIs made official so I can release my app. It's been over a year now Palm. Come on already!

I sympathize.

Can apps today send to the default apps? I just set Sprint Nav to be the default for Maps, but Yelp still calls Google (which I assume is because it's hard-coded), it'd be nice if they could send to the default app so that the user could decide where they want their info to go.

vote 4 .eml in "internalz" and .ical/.vcs in "icalimporter"

I would love to make BFGMaps the default for addresses instead of GoogleMaps or SprintNav.

+1 and I was just coming here to add that comment.

How can I add extensions to the defaults? I would like to add .rss but there is no obvious way to do that.

I don't think Palm needs to provide an API--doing so would let individual apps steal associations or would lead to apps fighting over them. (Compare to file associations on Windows.)

What's needed is to provide a UI to let users easily set associations themselves. The current default app list doesn't let you add new file types or change the associated applications for existing ones.

The user should be in control of what the default app for a file type is, not the app.

Hmm...I don't think so. The service calls being currently being used by Internalz (and others?) that will hopefully be coming to the official API sometime soon only make an app the default app for a certain file type if there is no other app currently installed that is able to handle that file type. If there is more than one app that can handle the file type, then the user IS given an option to choose which one should be the default. In that case the new app is simply added to the list of available options for that file type.

Okay, if the API is "add my app as a handler for this type" (as opposed to "set my app as THE default handler for this type"), then that'd be fine.

the default can always be set by the user - just look at the preferences menu in "Device Information" in the screenshot above.

The app is registering the possibility to open a special kind of filetype (extension)