Hi justinh,

   Thanks for your reply.


> Is that the package name you have defined in your Manifest for the
> package attribute?

yess thats the package name that is there in manifest file. I am
finding the package name from the main activity as shown bellow ,

String pkg = "demo.test.MyActivity";
        int pkg_point= pkg.lastIndexOf('.');
        am.restartPackage(pkg.substring(0,pkg_point)); // am is Activity
Manager
Is there any better/other way to find out the package and give as an
input parameter to restartPackage() ??

 >Also, you need to provide the parameter as a
> String.

Ya it is the string but in the previous post , I had written it
manually in this mail to replace pkg.subString(0,pkg_point) for better
understanding.

But still I am getting the same error as " 12-09 15:13:56.893: WARN/
ActivityManager(58): Invalid packageName: 1: demo.test "

Waiting for inputs,
Asif

-- 
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