Re: [android-developers] Re: start at boot app gives instantiationException:
On 2/21/2012 3:02 PM, Thomas wrote:
> The compile error:
> * PiesOfCodActivity cannot be resolved to a type
>
> The error essentially is that the RxBcast cannot be aware of an
> external app that exists on an Android somewhere. The
> PiesOfCodActivity is a retitled "helloworld" that works just fine on
> my Android.
> Perhaps there is some sort of intent construction where the app-to-be-
> is a string that represents future runtime intentions.
> Thanks for all of your good thoughts and help.
Of course not you put it in a different application. That's not what I
thought you asked about, I thought you wanted an app that would launch
at boot. Did you get it working with the receiver in the same package?
To launch another activity outside your package you need different
information in the intent. One way is to specify the package of the
other app:
Intent si = new
Intent(Intent.ACTION_MAIN).setPackage("com.hootinholler.PiesOfCod");
The other app needs to have an action MAIN defined in its manifest and
it also needs a category DEFAULT
<category android:name="android.intent.category.DEFAULT" />
I've tested this here with one application that only has the
PiesOfCodActivity in the PiesOfCod package and another app that only has
the RxBcast in a Pies package and constructs the intent as above.
Really this didn't take that much to solve given a little reading and
experimentation. I agree with Tre that you should probably read up on
Intents and how they get created and resolved.
Also I don't think it will be a good idea to have an app with no
launchable activity as it could make it hard for users to uninstall
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home