On Aug 2, 2011, at 10:12 AM, Tim Kelly wrote:
> Now that Xamarin (I'd like to know what that means and how to pronounce it)

"Xamarin" rhymes with "Tamarin" (the monkey species), with the "X" sounding 
phonetically like a 'Z' (like in Xylophone).

> 1.  In our PC/Windows phone application we check our version against a 
> service and if there's a new release, we download it and upgrade.  So, going 
> through this, I see Android and iOS use a sandbox concept differing from what 
> I'm familiar with.   So, how does one handle updates?

Normally the user needs to update the app, e.g. on the iPhone by starting the 
App Store app, tapping the Updates icon, and then tapping the Update All button.

I believe my Android device uses the notification tray to tell me when updates 
are available, but it's still up to me (the user) to actually update the app.

> Is it possible to download a program and once it gets downloaded it runs and 
> replaces the application?

On iOS? No. On Android, a full JIT is available, so you could in principal 
download the new assemblies, place them into some well-known location, then use 
Assembly.LoadFrom() to load the assemblies. There would be lots of reflection 
involved, but it could be done.

However, this approach may also be very brittle, given that the default Release 
behavior is to link the apps so that only the parts of the base class library 
that are actually used are present in the final app (in an effort to shrink app 
sizes):

        http://android.xamarin.com/Documentation/Linking

Consequently, if's entirely plausible that any assemblies you provide through 
your update mechanism may refer to types and members that don't exist within 
your app, unless you disable linking or skip linking on a particular set of 
types (which will increase your app size).

Given that you mentioned iPad support, it's moot anyway (there's no JIT on iOS).

> 2. Company's own these devices and put them in the field and part of the 
> business requirement is to make the sales application password protected so 
> it cannot be uninstalled (which also deletes all the sales records). Is there 
> a way to set a pin so an app cannot be removed?

Let's split up these two issues. :-)

It should be fairly straightforward to have your app cache data locally, and 
upload the sales records whenever a network is available. This way you won't 
lose (as many) sales records.

As for preventing app removal, I don't know of any such mechanism (though I'm 
no expert either).

> All I can come up with is a 'watch dog' approach where you have two 
> applications each monitoring the broadcast message for package removal and 
> then reloads it unless a pin is entered

Which only works on Android, not iOS (as iOS doesn't have concepts of Services 
or BroadcastReceivers or...). Unless there's some way of indicating that an app 
can't be uninstalled (and there very well may be, I don't know), this approach 
can't work on the iPad.

> Or how do you handle this business requirement?

More research. :-)

For example, on iOS there's:

        http://manuals.info.apple.com/en_US/Enterprise_Deployment_Guide.pdf

Chapter 2, Restriction Settings section (page 33) has a "Allow installing apps" 
setting, which allows disabling the ability to install additional apps. Perhaps 
this also controls removal of apps as well? I don't know.

Android may have a similar mechanism; again, I don't know.

 - Jon

_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to