OK, folks, I've read the beaming-related documentation in the "Palm OS 
Programming Bible" and in the "Palm OS Companion Vol. 2" again, trying to read 
between the lines this time. I still have no clue how to do what I want - but I 
am starting to understand why I couldn't figure it out the first time I read 
the documentation...

It seems that the short answer to most of my "how do you do that?" questions is 
"you can't". :-( Let's see whether I have understood it correctly.

1) "Customizing the Beam Acceptance Dialog Box" is something of a misnomer. 
Apparently, you can't really use a beam acceptance dialog of your choice (e.g., 
with your own text on it). The only thing you can do is add a popup list of 
categories to the standard beam acceptance dialog box. Correct?

2) If you want to show a completely different dialog, you can respond to the 
SysAppLaunchCmdExgAskUser launch code, display your dialog there, and stuff the 
proper response code (exgAskOK, exgAskCancel, exgAskDialog) in the 
ExgAskParamType structure that this launch code gets a pointer to. Correct?

3) However, this is mostly useless for my purposes, because, apparently, you 
can't get access to the contents of the database that is being beamed at the 
point when you have to decide whether to accept it or not. :-( You get things 
like the name of the database, the creator ID, a 32-bit number in which the 
sending application could stuff anything it wants - but that's about it; you 
don't get access to the database itself; you can't open it and you can't 
inspect its contents, in order to decide whether to accept or reject it. 
Correct?

3a) Under Palm OS 4.0 and above you can pass to the receiving application a bit 
more custom data than a 32-bit number. You can use the preview capabilities to 
pass a string or an image - and, I guess, you can encode whatever information 
you want in those. But that doesn't work in Palm OS 3.x and it isn't the 
contents of the database anyway. Correct?

3b) Other than that, during the actual transfer, you can define whatever 
protocol you want - for instance, you can precede the contents of the database 
you're beaming with information that would allow the receiving application to 
determine what to do with the actual data that follows. But that's *after* the 
point at which the user has been asked whether to accept the data or not. 
Correct?

4) While in Palm OS 4.0 and above you can have more than one application 
registered to receive objects of a particular kind (in earlier OS versions you 
can have only one), and while you can let the user choose which one to use and 
can specify which is the default one, you can't really "chain" such 
applications. That is, once it is decided which is the default application, the 
beamed object is passed to it, and this application can accept or reject it - 
but it cannot say "oops, sorry, this thing doesn't seem to be for me; try one 
of the others". Correct?

In relation to the above, I return to another question I asked in the past 
which nobody answered - how do I intercept application beaming *to* the device 
on which my application is running?

I understand now that I have to register my application as the one that should 
receive files with "prc" extension *and* the 
"application/x-pilot\t/application/vnd.palm" MIME types - both in default and 
in "unwrapped" modes. But what then?

Obviously, I cannot inspect the contents of the beamed application before 
deciding whether to accept it or not. I'll have to let the OS show its standard 
beam acceptance dialog, receive the application, inspect it and, if it turns 
out to be unacceptable, delete it. But what else should I do?

It seems that I can't "chain" to the Launcher to do the rest of the work. Does 
that mean that I have to figure out what is the category of the beamed 
application (from the 'taic' resource in it) and set that category manually? 
What about the sysAppLaunchCmdSyncNotify launch code that the beamed or 
HotSynced application are normally sent? Do I have to send it "manually", if my 
application is the one that receives beamed applications instead of the 
Launcher? How do I do that?

Regards,
Vesselin
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to