The code to be inserted in your app would look like the following.
Note that no internet permissions are required. These are only needed
for the activity implementing the intent, not the app that should be
updated.


Intent service = new Intent();
                service.setAction("org.openintents.intents.CHECK_VERSION");
                String uri= "http://www.host.com/my-update-file";;

                service.setData(Uri.parse(uri));
                service.putExtra("package_name", context.getPackageName());
                service.putExtra("app_name", "My App or so");

                int currentVersion = -1;
                try {
                        PackageInfo pi = 
context.getPackageManager().getPackageInfo(
                                        context.getPackageName(), 0);
                        currentVersion = pi.versionCode;
                } catch (NameNotFoundException e) {
                        Log.e(TAG, "NameNotFoundException", e);
                }

                service.putExtra("current_version", currentVersion);
                context.startService(service );

Friedger

On 31 Okt., 00:59, friedger <[EMAIL PROTECTED]> wrote:
> I am not sure whether I understand the request.
>
> Here is my understanding:
> There should be an intent, say "CHECK_VERSION", that includes app
> UUID, app name and currently installed version. 
> (Seehttp://www.openintents.org/en/node/128)
> An activity implementing the intent protocol will check Android Market
> and return the current version no to the calling activity.
>
> If that is the request I don't see a possibility to check Android
> Market.
> However, if the intent contains a data Uri for the location of a info
> file containing the latest version then we can provide such an intent
> and activity.
>
> Friedger
>
> On 30 Okt., 22:46, "Shane Isbell" <[EMAIL PROTECTED]> wrote:
>
> > On Thu, Oct 30, 2008 at 1:20 PM, friedger <[EMAIL PROTECTED]> wrote:
>
> > > Currently, I don't see any possibility to get the version number of an
> > > app on the Android Market. Does anybody know about one?
>
> > Unfortunately, we are not allowed by the Android Market terms to load up our
> > application, so I can't investigate. I'm just going by the documentation at
> > the bottom:http://code.google.com/android/devel/sign-publish.html. If the
> > Market UID is not available, then Google needs to update their
> > documentation.
>
> > Shane
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Android Discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/android-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to