I'm developing a pocket PC application which is supposed to be
started automatically whenever the PDA is cradled (and connected to the
desktop via ActiveSync).

This is achieved by executing the following two lines at the beginning
of the application:

OpenNETCF.Win32.Notify.Notify.RunAppAtEvent(path_to_app,
OpenNETCF.Win32.Notify.NotificationEvent.None)
OpenNETCF.Win32.Notify.Notify.RunAppAtEvent(path_to_app,
OpenNETCF.Win32.Notify.NotificationEvent.RS232Detected)

Now, the above works fine on every PDAs I've tested so far (all of
these running Windows Mobile 2003): Once the application has been run,
it will start automatically the next time the PDA is cradled.

However, I've just tested the application on an iPAQ 2490 (with
Windows Mobile 5.0) - and nothing happens: The application is NOT
started automatically when the PDA is cradled.

Why? Any ideas and/or suggestions will be appreciated.

/Bengt

Re: RS232Detected problem by Peter

Peter
Wed Nov 02 10:02:49 CST 2005

Have you tried using the SetUserNotification method instead - this wraps
CeSetUserNotificationEx as CeRunAppAtEvent is deprecated.

Peter

<bmp@key2know.dk> wrote in message
news:1130931677.017349.234520@f14g2000cwb.googlegroups.com...
> I'm developing a pocket PC application which is supposed to be
> started automatically whenever the PDA is cradled (and connected to the
> desktop via ActiveSync).
>
> This is achieved by executing the following two lines at the beginning
> of the application:
>
> OpenNETCF.Win32.Notify.Notify.RunAppAtEvent(path_to_app,
> OpenNETCF.Win32.Notify.NotificationEvent.None)
> OpenNETCF.Win32.Notify.Notify.RunAppAtEvent(path_to_app,
> OpenNETCF.Win32.Notify.NotificationEvent.RS232Detected)
>
> Now, the above works fine on every PDAs I've tested so far (all of
> these running Windows Mobile 2003): Once the application has been run,
> it will start automatically the next time the PDA is cradled.
>
> However, I've just tested the application on an iPAQ 2490 (with
> Windows Mobile 5.0) - and nothing happens: The application is NOT
> started automatically when the PDA is cradled.
>
> Why? Any ideas and/or suggestions will be appreciated.
>
> /Bengt
>



Re: RS232Detected problem by bmp

bmp
Tue Nov 08 04:56:42 CST 2005

Hi,

Thanks for the suggestion - the problem remains, though: The code below
works o.k. on my iPAQ 4700 w/Windows Mobile 2003, but nothing happens
on the iPAQ 2490 w/Windows Mobile Version 5.0.

Here's my code:

Try
Dim appPath As String =
System.Reflection.Assembly.GetExecutingAssembly().GetModules()(0).FullyQualifiedName
Dim trg As New UserNotificationTrigger
trg.Type = New NotificationType
trg.Type = NotificationType.Event
trg.Event = New NotificationEvent
trg.Event = NotificationEvent.RS232Detected
trg.Application = appPath
Dim hNotification As Integer =
OpenNETCF.Win32.Notify.Notify.SetUserNotification(trg, Nothing)
Catch ex As Exception
MsgBox(ex.Message)
End Try



Peter Foot [MVP] skrev:

> Have you tried using the SetUserNotification method instead - this wraps
> CeSetUserNotificationEx as CeRunAppAtEvent is deprecated.
>
> Peter
>
> <bmp@key2know.dk> wrote in message
> news:1130931677.017349.234520@f14g2000cwb.googlegroups.com...
> > I'm developing a pocket PC application which is supposed to be
> > started automatically whenever the PDA is cradled (and connected to the
> > desktop via ActiveSync).
> >
> > This is achieved by executing the following two lines at the beginning
> > of the application:
> >
> > OpenNETCF.Win32.Notify.Notify.RunAppAtEvent(path_to_app,
> > OpenNETCF.Win32.Notify.NotificationEvent.None)
> > OpenNETCF.Win32.Notify.Notify.RunAppAtEvent(path_to_app,
> > OpenNETCF.Win32.Notify.NotificationEvent.RS232Detected)
> >
> > Now, the above works fine on every PDAs I've tested so far (all of
> > these running Windows Mobile 2003): Once the application has been run,
> > it will start automatically the next time the PDA is cradled.
> >
> > However, I've just tested the application on an iPAQ 2490 (with
> > Windows Mobile 5.0) - and nothing happens: The application is NOT
> > started automatically when the PDA is cradled.
> >
> > Why? Any ideas and/or suggestions will be appreciated.
> >
> > /Bengt
> >