Oh, and you are setting up an EXPLICIT intent, not an IMPLICIT intent... Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware
On Fri, Jun 29, 2012 at 4:25 PM, Justin Anderson <[email protected]>wrote: > You already asked this question and you received an answer... What more do > you want? The problem is that nothing is calling your LaunchComponent() > method... > > As you were told before, override the onCreate() method and call your > LaunchComponent() method from there. > > Thanks, > Justin Anderson > MagouyaWare Developer > http://sites.google.com/site/magouyaware > > > > On Fri, Jun 29, 2012 at 12:32 PM, Jaison Brooks <[email protected]>wrote: > >> Ok, im feeling really stupid right now, for some reason i cannot figure >> out how to create just a signal application that when the user clicks the >> icon from the home screen, it opens a different application. For instance, >> you click on my app and it takes you to your email icon, or settings or >> something along those lines. >> >> Here is some code i got so far, but its not doing anything when i open >> the application, just showing blank white screen with the label of my >> application. >> >> JAVA File >> >> package com.xxx.xxx.xxx; >> >> import android.app.Activity; >> import android.content.Intent; >> import android.content.pm.PackageManager; >> >> >> public class MainActivity extends Activity { >> >> public void LaunchComponent (String packageName, String name){ >> Intent task = new >> Intent(Intent.ACTION_MAIN); >> PackageManager manager = >> getPackageManager (); >> task = manager.getLaunchIntentForPackage("com.xxx.xxx.xxx"); >> task.addCategory(Intent.CATEGORY_HOME); >> startActivity(task); >> >> } >> } >> >> i do NOT have a layout file, i didnt think i would need one, since i am >> not creating a UI at all. >> Any recommendations would help alot, i've tried a few links, and i just >> cannot get something to compile right. >> >> http://stackoverflow.com/questions/2780102/open-another-application-from-your-own-intent >> >> -- >> 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 > > > -- 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

