It was relatively painless, though the documentation is pretty spotty.
Since Palm isn't yet letting people upload things to the App Catalog, here's how you install this:
- Email yourself a link to the .ipk file. Don't mail the file itself as an attachment: just send yourself an email with the URL in it. You can do that by clicking here.
Open that mail message on your Pre, and click the link.
That will appear to have done nothing, but it did! Go to the first page of the Launcher, and you'll see that the new application has been installed.
Dear Lazyweb, I have several questions.
- How do I get it into the Palm App Catalog?
How do I give a button a different background color, while still having it look like a standard Pre button?
Update: Oh, the email I've been getting. Look, it only does whole numbers because if you insist that your tip be accurate to the penny you are a cheapskate weirdo. Here in the Colonies, we use paper money, not coins. If your bill is $44.22, just enter $45. Don't go all Scrooge McAsperger's on us, ok?
Update 2: Holy shit! The intardwebs have a new cesspool, I see!
From reading the unofficial Pre dev wiki, it seems that the way they got the PalmOS emulator to use native code was via a NPAPI plugin. I sure as hell hope they provide a better API for third-party apps...
Well, that's basically how it works with Mac Dashboard apps, too. That's how I did the dashboard Dali Clock (though it's not NPAPI, the plugins are all swaddled in XML instead). Has anyone published how you actually do that on the Pre, though? Like, where does the .so go and how do you reference it?
Christ. I fucked that up but good.
http://predev.wikidot.com/application-framework suggests that you reference the plugin via an <object> tag with (one of) the plugin's content-type(s) (either statically or inserted via DOM prodding. The /etc/palm/browser.conf quoted at http://predev.wikidot.com/tidbits suggests that the plugin directory is /usr/lib/BrowserPlugins .
I don't have a Pre, but I'm very interested in getting one once they come out with a GSM version. How do you like the SDK so far?
The NPAPI stuff is wrapped in a C++ class called AdapterBase which also has some virtual functions for input event handling such as keypresses, touchscreen taps, moves, etc. Run nm | c++filt on any of the .so files in /usr/lib/BrowserPlugins to see what I'm talking about. Then you have to worry about how to draw, which I think nobody has figured out yet.
The Konami Code should have select, and then start! At least, it did on my NES.
Plus, watch this, it's about that code, it's funny, and it's my friends band.
Select was to put Contra into two-player mode. It wasn't part of the code.
Well in that case neither was "start" since it was to actually start the game.
My thought was that palm did it this way to imply that they didn't have any friends.
This is not what you're looking for, but I guess I should be the ghost of Christmas future here: They're clearly trying to do something arch-independent, so investing a lot of effort to game it might be 'fun' but counterproductive. Particularly if they do survive long enough to license it out to other manufacturers on other hardware.
On the other hand, <canvas> will be the bottleneck but even the WTF of C compiled to js may be Good Enough these days. So learning how to put up with this strange new world will be an adventure in its own right.
As a further example, there are some true nutjobs out there:
I read that as "Win-To-Fail [ratio]", instead of as the more common meaning.
Probably means I've been on the net a wee bit too long.
I see that you correctly calculate the tip on the pre-tax amount. Well done. A lot of people screw that up and use the post-tax total.
why, restaurant service workers around the world have been delighting in this fact for ages!
Right now the way to install apps outside of the App Catalog is to e-mail yourself a link to the .ipk. Kinda kludgy, but I'm assuming there will be a supported way at some point. I vaguely recall them saying everything wouldn't be required to go through the App Catalog.
Ah, apparently you also have to sign it before that trick works!
Useful for americans, I suppose :)
I think Canada has this mandatory tip thing too. Weird countries.
So you email yourself a link, which you click on.
Nothing appears to happen (big big problem there!)
Then you find the app has installed itself????
That sounds like one MAJOR security hole to me.
The way people will just randomly click on links without checking their destination, this worries me. What if it had been a self-replicating exploit, a virus or somesuch that goes through your inbox and just mails itself on with a "Hey buddy. I found this great website. Click here".
With NO indication that it has done anything, or even a request for confirmation "Do you want to install this app?" this is a pretty big security hole I think.
Yeah, it's pretty hokey. I assume it's a bug that this works at all, and they'll "fix" that eventually. Let's just hope they add a sane way of distributing apps before then.
You made it onto engadget. Or rather, your image did... sans-credit.
Mole wants to know if you can write him up a "Cylon Detector" Ap for the Pre. PWEEZ?
Last I checked the dude works as a radiologist. Surely he already has access to some form of Cylon detector gizmo?
Yeah, OK, probably not very portable, but ...
Nice stuff, dude ;-)
I don't have the answers to your queries, but I'd love to see them posted over at Stack Overflow, I imagine things will turn up for you!
no, I'm not gonna suggest a decimal point. And I don't have a palm so this makes no difference to me and I haven't seen how the app works. But the thing I've always wanted out of the tip calculator on my cell phone was for a screen after I've entered in the subtotal where it would show me the tips and totals for different percentages. For instance, I can see that 15% is w and 18% is x and 20% is y and 23% is z, and then make a judgment call based on how good the service was.
And the post almost made me start working on a dali clock port in pure js. almost.
People get butt-hurt over the stupidest things.
You know, I'm not sure people who actually use tip calculators have thee right to call anyone else a cheapskate weirdo.
I'm not cheap, I'm just bad at arithmetic!
Wow. I was thinking about dicking around with the SDK once it's really out, but looking at that thread in "Update 2" kind of makes me want to never deal with those people at all.
P.S. You have the best fans. ;)
I always wondered this about tip calculators: why do they have so many fields and options, such as the tax field? Isn't the whole premise of these apps that you're so drunk by the end of the meal/evening at the bar that you need help figuring out a tip and can't be trusted to take the pre-tax amount times two? All that precision, and the final result is still 1.5% off (because it divided 74 by 3 and got 25).
Here is my unsolicited opinion: why not allow only one field to be entered, the amount on the check. Then, automatically display several tip amounts and corresponding totals. That's what computers are for!