I think that's a very good reason not to send it to a newly installed
app. Though you could give the user the option to start the app
immediately after install, with a button for example.

On Jun 17, 8:55 pm, Dianne Hackborn <[email protected]> wrote:
> We deliberately don't send this broadcast to an app when it is first
> installed (as of cupcake you -will- get the broadcast when being updated
> from a previous install).  It is generally up to the user to launch your app
> when they want to.
>
> On Tue, Jun 16, 2009 at 12:11 PM, [email protected] <[email protected]
>
>
>
> > wrote:
>
> > I'm not sure, but I believe the following code may help.
>
> > put the folling in your AndroidManifest.xml as a child of your
> > Application tag
>
> >       <receiver android:name="com.ericcrook.InstallReceiver"
> > android:enabled="true">
> >                <intent-filter>
> >                        <action
> > android:name="android.intent.action.PACKAGE_ADDED" /
>
> >                        <data android:scheme="package" />
> >                </intent-filter>
> >        </receiver>
>
> > Then create a class that extends BroadcastReceiver, and use it's
> > onReceive method to start your activity
>
> >   public class InstallReceiver extends BroadcastReceiver {
>
> >   public void onReceive(Context context, Intent intent) {
>
> >      String data = intent.getDataString();
>
> >      if (data.equals("package:com.ericcrook.InstallReceiver")) {
> >         //Start your application using startActivity or whatever is
> > appropriate for
> >         //your project
> >      }
> >   }
> > }
>
> > I'm not very good with the Intent system, so some of this may be
> > correct, but hopefully this is better than nothing.
>
> > On Jun 16, 6:21 am, Raj <[email protected]> wrote:
> > > Hi,
> > > I want to start my application just after it gets installed on the
> > > device. Is there any way out in Android to do so.
> > > I was wondering if there is any receiver to get informed on package
> > > installed.
> > > Regards
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to