Windows Phone @ MoDaCo: Developers: How to include AppToDate support (advanced) - Windows Phone @ MoDaCo

Jump to content

Galaxy Nexus Review
We put the Galaxy Nexus and Ice Cream Sandwich through their paces.

Google Music Launch
Google bring Music out of beta and launch their music store.

MoDaCo Plus / Ad Free
Hate ads? Want cool stuff? Sign up for a MoDaCo Plus / MoDaCo Ad Free account with Online Kitchen access!

Close
Open
Close
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Developers: How to include AppToDate support (advanced)


#1 User is offline   PaulOBrien 

  • It's My Party
  • View gallery
  • Group: Founder
  • Posts: 32,387
  • Joined: 06-November 02
  • Gender:Male
  • Location:Norwich, UK
  • Interests:Snowboarding, Arsenal FC, Mobile Phones (duh!), Fast Cars, Slow VW Campers!
  • Devices:Galaxy S II / Xoom 3G
  • Twitter:@paulobrien

Posted 23 April 2008 - 12:50 PM

Advanced AppToDate support

Please note that this topic is an addition to the AppToDate support (basic) topic, which can be found here - you should ensure you are familiar with these basics first!

Descriptions

First of all let's talk about the field. In the basic tutorial, it was assumed that this was a text only field, when in fact it is XHTML. That means you can use XHTML tags to enhance the look of your description content, e.g.

<description><b>My Application</b><br /><br />This is some information about <i>my application</i></description>

Note that this is XHTML and no plain HTML, that is all tags MUST be correctly closed, or they will break the XML structure. To be sure, load your XML up in a browser when complete and ensure it is parsed correctly! Also note that the user cannot navigate within this control currently (it is for display only).

XML location

In the basic tutorial, you were told to install your XML file to the '\Application Data\AppToDate' directory. While this is absolutely fine, you may prefer to install this to the same location as your application for tidiness and perhaps to save storage space. You now can! You simply need to tell AppToDate where to find the XML with a registry key... like so:

Location: HKCU\Software\MoDaCo\AppToDate\XML
String Value: MyApp=\Storage Card\Program Files\MyApp\MyApp.xml

In this example, as you can probably guess, AppToDate will search for MyApp.xml in the location you specified, and parse it in exactly the same way as if you had just dropped it into the \Application Data\AppToDate directory.

Device specific caburl entries

In the basic tutorial, I showed you how to formulate your caburl entry in the XML like so:

<caburl>http://www.mysite.com/apptodate/myapp.cab</caburl>

This works great, but there may be some instances whereby you wish to install a specific CAB file based on the device's type (eg Pocket PC / Smartphone), OS (eg 5.2) or resolution (eg 640x480). You can do this with multiple caburl entries.

The first point to note for this advanced feature is that you must ALWAYS have a 'basic' caburl entry specified as above. This is because this is the one that will be used if a caburl with specific criteria cannot be matched. Omitting the basic caburl entry will cause AppToDate to rejection your application XML (bad).

Now think of the device type / os and resolution as 'attributes', which are search for in a particular order. An example... let's imagine I have a device which is Pocket PC, OS version 5.2 and 640x480 (note the higher number always comes first in resolution). You can view a device's attributes in the AppToDate 'About' box.

When AppToDate runs, it will look for caburls in the following order...

FIRST:
<caburl device='pocketpc' os='5.2' resolution='640x480'>http://www.mysite.com/apptodate/myapp.cab</caburl>

SECOND:
<caburl device='pocketpc' os='5.2'>http://www.mysite.com/apptodate/myapp.cab</caburl>

THIRD:
<caburl device='pocketpc'>http://www.mysite.com/apptodate/myapp.cab</caburl>

FINALLY:
<caburl>http://www.mysite.com/apptodate/myapp.cab</caburl>

...so as you can see, you can be quite specific or quite generic, depending on how you configure your XML. You DO need to take note of this order of precedence.

More example, you CAN:

- Specify a CAB for PPC and one for SP
- Specify a CAB for PPC WM5, PPC 2003, SP WM5 and SP 2003

Although you CANNOT (to the order attributes are applied):

- Specify a CAB for VGA and QVGA all platforms
- Specify a CAB for OS 5.2 both platforms

I hope this makes sense and these functions are useful!

Feedback welcomed!

P

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco / Follow MoDaCo Android on Twitter - http://twitter.com/modacoandroid

Want to donate? MoDaCo is raising money the Multiple Sclerosis society.

Posted Image
0

Sponsored Links


#2 User is offline   chucky.egg 

  • Did I say that out loud?
  • PipPipPipPipPipPip
  • Group: MoDaCo Ad Free
  • Posts: 4,724
  • Joined: 20-August 03
  • Location:Kent, England
  • Interests:Sleeping
  • Devices:Desire S
  • Twitter:@chucky_egg

Posted 23 April 2008 - 02:45 PM

Can we have an example of how to set the registry key for the XML location using variables in the INF?

ATM i'm hard-coding paths, but if I put the XML in the app folder I'll need to set the reg key with the %InstallDir% and I don't know how to do that.

0


#3 User is offline   PaulOBrien 

  • It's My Party
  • View gallery
  • Group: Founder
  • Posts: 32,387
  • Joined: 06-November 02
  • Gender:Male
  • Location:Norwich, UK
  • Interests:Snowboarding, Arsenal FC, Mobile Phones (duh!), Fast Cars, Slow VW Campers!
  • Devices:Galaxy S II / Xoom 3G
  • Twitter:@paulobrien

Posted 23 April 2008 - 03:02 PM

You can't do that via the inf, that'd need a setup dll AFAIK.

Hence, in your case, putting it in the \Application Data\AppToDate dir is the best option.

P

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco / Follow MoDaCo Android on Twitter - http://twitter.com/modacoandroid

Want to donate? MoDaCo is raising money the Multiple Sclerosis society.

Posted Image
0


#4 User is offline   yarus23 

  • Newbie
  • Pip
  • Group: MoDaCo Plus
  • Posts: 3
  • Joined: 24-December 06

Posted 24 April 2008 - 04:45 PM

View Postchucky.egg, on Apr 23 2008, 17:45, said:

Can we have an example of how to set the registry key for the XML location using variables in the INF?

ATM i'm hard-coding paths, but if I put the XML in the app folder I'll need to set the reg key with the %InstallDir% and I don't know how to do that.



[Registry.All]
HKCU,Software\Modaco\AppToDate\XML,YourAppName,0x00000000,%InstallDir%

0


#5 User is offline   yarus23 

  • Newbie
  • Pip
  • Group: MoDaCo Plus
  • Posts: 3
  • Joined: 24-December 06

Posted 24 April 2008 - 04:51 PM

BTW - what is an ID of SP? 'smartphone'?

0


#6 User is offline   PaulOBrien 

  • It's My Party
  • View gallery
  • Group: Founder
  • Posts: 32,387
  • Joined: 06-November 02
  • Gender:Male
  • Location:Norwich, UK
  • Interests:Snowboarding, Arsenal FC, Mobile Phones (duh!), Fast Cars, Slow VW Campers!
  • Devices:Galaxy S II / Xoom 3G
  • Twitter:@paulobrien

Posted 24 April 2008 - 05:21 PM

Yeah 'smartphone'... and nice work on that reg entry... :D

It would be

HKCU,Software\Modaco\AppToDate\XML,YourAppName,0x00000000,%InstallDir%\yourapp.xml

I guess?

P

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco / Follow MoDaCo Android on Twitter - http://twitter.com/modacoandroid

Want to donate? MoDaCo is raising money the Multiple Sclerosis society.

Posted Image
0


#7 User is offline   yarus23 

  • Newbie
  • Pip
  • Group: MoDaCo Plus
  • Posts: 3
  • Joined: 24-December 06

Posted 24 April 2008 - 06:48 PM

View PostPaul (MVP), on Apr 24 2008, 20:21, said:

HKCU,Software\Modaco\AppToDate\XML,YourAppName,0x00000000,%InstallDir%\yourapp.xml

I guess?



Yes :D

0


#8 User is offline   chucky.egg 

  • Did I say that out loud?
  • PipPipPipPipPipPip
  • Group: MoDaCo Ad Free
  • Posts: 4,724
  • Joined: 20-August 03
  • Location:Kent, England
  • Interests:Sleeping
  • Devices:Desire S
  • Twitter:@chucky_egg

Posted 24 April 2008 - 08:39 PM

Thanks for that

One last thing - if I put the XML in my app folder does the .ico file go there too?

0


#9 User is offline   PaulOBrien 

  • It's My Party
  • View gallery
  • Group: Founder
  • Posts: 32,387
  • Joined: 06-November 02
  • Gender:Male
  • Location:Norwich, UK
  • Interests:Snowboarding, Arsenal FC, Mobile Phones (duh!), Fast Cars, Slow VW Campers!
  • Devices:Galaxy S II / Xoom 3G
  • Twitter:@paulobrien

Posted 24 April 2008 - 09:01 PM

Yeah...

P

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco / Follow MoDaCo Android on Twitter - http://twitter.com/modacoandroid

Want to donate? MoDaCo is raising money the Multiple Sclerosis society.

Posted Image
0


#10 User is offline   MikeSel 

  • Regular
  • PipPip
  • Group: Members
  • Posts: 104
  • Joined: 11-December 05
  • Gender:Male
  • Location:Hull
  • Devices:Apple iPhone
  • Twitter:@mikesel

Posted 02 January 2009 - 11:02 AM

View PostPaul (MVP), on Apr 23 2008, 13:50, said:

..... which can be found here


The link is broken.. Think there's a typo in there http://ttp://www.modaco.com/content/AppToD...e-support-basic

Cheers
Mike

Apple iPhone
Vist My Website
@mikesel
0


#11 User is offline   PaulOBrien 

  • It's My Party
  • View gallery
  • Group: Founder
  • Posts: 32,387
  • Joined: 06-November 02
  • Gender:Male
  • Location:Norwich, UK
  • Interests:Snowboarding, Arsenal FC, Mobile Phones (duh!), Fast Cars, Slow VW Campers!
  • Devices:Galaxy S II / Xoom 3G
  • Twitter:@paulobrien

Posted 07 January 2009 - 03:31 PM

Oopsie, fixed! :rolleyes:

P

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco / Follow MoDaCo Android on Twitter - http://twitter.com/modacoandroid

Want to donate? MoDaCo is raising money the Multiple Sclerosis society.

Posted Image
0


#12 User is offline   TonyJ 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 09-February 09
  • Devices:AT&T Fuze (HTC Touch Pro)

Posted 09 February 2009 - 09:30 PM

AppToDate is a great idea... I just installed it on my device and I will be adding the XML files to the next version of my game Scrobble (which you can find over at the xda-developers forum).

Is there a way to specify a mirror URL for your CAB? If not, this might be a handy feature. If your main server was down for whatever reason, AppToDate could pull it off the mirror.

I suggested the dual XML file solution to guy who is working on Gecko -- which is a CAB repository / application manager (right now they just host your CAB file for you... so when you update your application you have to notify them and have them re-download your CAB). There's a whole bunch of overlap in these two, and other applications as well (DeviceUpdate, JAK Portal).

It would be GREAT if everyone worked together on them and at least came up with a simple/unified way for developers to maintain their applications, and notify every repository when there are updates. The dual-XML file solution would probably work -- that way the developer can keep an XML file on their server, one installed with the app, and every app-management client can use the same XML files. If Gecko wants to keep a centralized CAB repository then they can download the CAB files from the developer's URL, and then the Gecko client can download them from the Gecko repository.

(That's my 2 cents, anyway! :) ).

0


#13 User is offline   TonyJ 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 09-February 09
  • Devices:AT&T Fuze (HTC Touch Pro)

Posted 11 February 2009 - 09:41 AM

View PostPaul (MVP), on Apr 24 2008, 09:21, said:

Yeah 'smartphone'... and nice work on that reg entry... :)

It would be

HKCU,Software\Modaco\AppToDate\XML,YourAppName,0x00000000,%InstallDir%\yourapp.xml

I guess?

P



I'm having a little trouble parsing this registry entry...

Does this mean I need to create a string key in HKCU\Software\Modaco\AppToDate\ and call it XML,YourAppName,0x00000000,%InstallDir% and set it to yourapp.xml? (replacing YourAppName and YourApp obviously) --- ...that doesn't seem like a well-formed registry key.

Or create a string key in
[b]HKCU\Software\Modaco\AppToDate\XML\YourAppNamex00000000\[/b]
called %InstallDir% and set it to yourapp.xml? Neither of these look "correct." Or something else...?

I'm using Visual Studio 2008 and oddly enough the installer/CAB setup tool doesn't let you put files in the \Application Data\ folder (as far as I can tell). So I need to put the XML file in the install dir and use a registry key to tell AppToDate where to find the XML file.

This post has been edited by TonyJ: 11 February 2009 - 09:43 AM

0


#14 User is offline   PaulOBrien 

  • It's My Party
  • View gallery
  • Group: Founder
  • Posts: 32,387
  • Joined: 06-November 02
  • Gender:Male
  • Location:Norwich, UK
  • Interests:Snowboarding, Arsenal FC, Mobile Phones (duh!), Fast Cars, Slow VW Campers!
  • Devices:Galaxy S II / Xoom 3G
  • Twitter:@paulobrien

Posted 11 February 2009 - 10:17 AM

View PostTonyJ, on Feb 9 2009, 21:30, said:

AppToDate is a great idea... I just installed it on my device and I will be adding the XML files to the next version of my game Scrobble (which you can find over at the xda-developers forum).

Is there a way to specify a mirror URL for your CAB? If not, this might be a handy feature. If your main server was down for whatever reason, AppToDate could pull it off the mirror.

I suggested the dual XML file solution to guy who is working on Gecko -- which is a CAB repository / application manager (right now they just host your CAB file for you... so when you update your application you have to notify them and have them re-download your CAB). There's a whole bunch of overlap in these two, and other applications as well (DeviceUpdate, JAK Portal).

It would be GREAT if everyone worked together on them and at least came up with a simple/unified way for developers to maintain their applications, and notify every repository when there are updates. The dual-XML file solution would probably work -- that way the developer can keep an XML file on their server, one installed with the app, and every app-management client can use the same XML files. If Gecko wants to keep a centralized CAB repository then they can download the CAB files from the developer's URL, and then the Gecko client can download them from the Gecko repository.

(That's my 2 cents, anyway! :) ).

The mirror idea is definitely valid... I also plan to offer CAB hosting...

P

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco / Follow MoDaCo Android on Twitter - http://twitter.com/modacoandroid

Want to donate? MoDaCo is raising money the Multiple Sclerosis society.

Posted Image
0


#15 User is offline   TobsTec 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 10-May 07

Posted 14 April 2009 - 09:46 AM

Hi Guys!

First of all:
Great idea that AppToDate, i was thinking myself a while ago that something like UpdateStar or VersionTracker would be really cool for Windows Mobile devices and what do i find: It's already there. :excl:

I was asked by a user of KeePassPPC / KeePassSD to add AppToDate support.
I had a quick look and here are a few comments (no offense):

I think AppToDate should scan for *.xml files itself when it starts up. So look for an apptodate.xml in ever sub-folder in
\Program Files or \Storage Card\Program Files instead of having every application developer to add/remove stuff from the registry.

AppToDate doesn't seem to work when a proxy is used.
(Honestly i never understood the Work / Internet / Proxy setup stuff. I always end up switching manually between "i am at home" and "i am at work" which translates to "use no proxy for internet" and "use a proxy for internet connections".)

There is no security that nobody fiddled with the XML file. I know this is a tad paranoid, but users of KeePass are generally pretty paranoid and even insisted on PGP detached signatures for the file releases, so some rudimentary security which ensures that "apptodate.xml" in folder "Program Files\MyGreatApp\" belongs to "Program Files\MyGreatApp\MyGreatApp.exe" and hasn't been edited by someone, somehow would be nice. Didn't had a brainwave how to do that yet though...

Bests,
Tobias

0


Sponsored Links

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2012. MoDaCo uses IntelliTxt technology. Privacy Policy / Contact Details.

Skin and Language

Sign in here


Sign in options
Log in with Facebook Log in with Twitter   Go to advanced login Register Now!