Hi,

Hope all doing well.

I am trying to install app using following intent..

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(apkUri, "application/vnd.android.package-
archive");
startActivity(intent);

This will launch package installer screen with ok & cancel commands
(depends on device) for user approval.

If the user press Ok ,app will install & if user press
cancel,installation will decline..

Can I get these callbacks to my programme depending on user selection
means whether installation is successful or declined...

Do I need to specify some key in the intent to acieve this????

Thanks & Regards,
Ashiq sayyad

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-platform@googlegroups.com.
To unsubscribe from this group, send email to android-platform+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

Search Discussions

  • Josh Brown at Mar 3, 2012 at 1:24 am
    There's the ACTION_PACKAGE_ADDED<http://developer.android.com/intl/de/reference/android/content/Intent.html#ACTION_PACKAGE_ADDED> broadcast
    you could use to see when it's installed. I don't think there's one for if
    it was declined, but you could use some trickery in your onResume(). The
    only problem is if they hit the home button when the installer is showing
    and then somehow navigate back to your app in such a way that they can
    still get back to the installer.
    On Thursday, March 1, 2012 7:08:58 AM UTC-8, ashiq sayyad wrote:

    Hi,

    Hope all doing well.

    I am trying to install app using following intent..

    Intent intent = new Intent(Intent.ACTION_VIEW);

    intent.setDataAndType(apkUri, "application/vnd.android.package-
    archive");
    startActivity(intent);

    This will launch package installer screen with ok & cancel commands
    (depends on device) for user approval.

    If the user press Ok ,app will install & if user press
    cancel,installation will decline..

    Can I get these callbacks to my programme depending on user selection
    means whether installation is successful or declined...

    Do I need to specify some key in the intent to acieve this????

    Thanks & Regards,
    Ashiq sayyad


    On Thursday, March 1, 2012 7:08:58 AM UTC-8, ashiq sayyad wrote:

    Hi,

    Hope all doing well.

    I am trying to install app using following intent..

    Intent intent = new Intent(Intent.ACTION_VIEW);

    intent.setDataAndType(apkUri, "application/vnd.android.package-
    archive");
    startActivity(intent);

    This will launch package installer screen with ok & cancel commands
    (depends on device) for user approval.

    If the user press Ok ,app will install & if user press
    cancel,installation will decline..

    Can I get these callbacks to my programme depending on user selection
    means whether installation is successful or declined...

    Do I need to specify some key in the intent to acieve this????

    Thanks & Regards,
    Ashiq sayyad


    On Thursday, March 1, 2012 7:08:58 AM UTC-8, ashiq sayyad wrote:

    Hi,

    Hope all doing well.

    I am trying to install app using following intent..

    Intent intent = new Intent(Intent.ACTION_VIEW);

    intent.setDataAndType(apkUri, "application/vnd.android.package-
    archive");
    startActivity(intent);

    This will launch package installer screen with ok & cancel commands
    (depends on device) for user approval.

    If the user press Ok ,app will install & if user press
    cancel,installation will decline..

    Can I get these callbacks to my programme depending on user selection
    means whether installation is successful or declined...

    Do I need to specify some key in the intent to acieve this????

    Thanks & Regards,
    Ashiq sayyad
    --
    You received this message because you are subscribed to the Google Groups "android-platform" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/android-platform/-/Xog3xJ9OdqgJ.
    To post to this group, send email to android-platform@googlegroups.com.
    To unsubscribe from this group, send email to android-platform+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.
  • Chris Stratton at Mar 3, 2012 at 1:43 am

    On Friday, March 2, 2012 8:24:33 PM UTC-5, Josh Brown wrote:
    There's the ACTION_PACKAGE_ADDED<http://developer.android.com/intl/de/reference/android/content/Intent.html#ACTION_PACKAGE_ADDED> broadcast
    you could use to see when it's installed. I don't think there's one for if
    it was declined, but you could use some trickery in your onResume(). The
    only problem is if they hit the home button when the installer is showing
    and then somehow navigate back to your app in such a way that they can
    still get back to the installer.

    Can't you just ask the package manager if it's (already) installed ? If
    not you fire off another view intent to begin a new installation attempt.
    You can't force the user to agree, but then your app doesn't have to go
    beyond that point if they don't.

    --
    You received this message because you are subscribed to the Google Groups "android-platform" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/android-platform/-/AFxLUZ862IcJ.
    To post to this group, send email to android-platform@googlegroups.com.
    To unsubscribe from this group, send email to android-platform+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupandroid-platform @
categoriesandroid
postedMar 1, '12 at 3:09p
activeMar 3, '12 at 1:43a
posts3
users3
websiteandroid.com

People

Translate

site design / logo © 2022 Grokbase