Monday, February 28, 2011

[android-developers] Re: startactivity vs launch from home screen - for adobe AIR app

I finally achieved what I wanted.

Here is the code.

Intent myIntent;
myIntent = new Intent(this, newActivity.class);
myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
myIntent.addCategory("android.intent.category.LAUNCHER"); //earlier
I did not add this line.
myIntent.setAction("android.intent.action.MAIN"); //
earlier I did not add this line.
startActivityForResult(myIntent, 10);


To debug the issue: i used LogCat log. I checked the difference
between when activity is started by clicking in home screen and
started from another activity.

On Feb 24, 7:38 pm, Niket <niket.kapa...@gmail.com> wrote:
> Hi,
>
> I downloaded this java application from net.
> Link :http://rosarioconti.wordpress.com/2010/10/03/extending-your-android-a...
>
> Basically this application uses
> dexLoader.loadClass("com.adobe.air.AndroidActivityWrapper") to create
> class instance and then call "OnCreate()" method of Adobe Air class
> with swf file name as an argument. And so air runtime is launched and
> SWF file is run.
>
> This activity is working perfectly fine.
>
> Now when I try to launch same activity via startactivity(), activity
> is launched successfully. All function calls are done successfully.
> But Air application is not launched. I can say, Java part is loaded
> successfully because I can see buttons which I put in java app layout.
>
> I am not getting the reason, why application launches AIR module and
> SWF while invoking directly but not when calling from another
> activity.
>
> I tried several permutations like : multiprocess flag true; specify
> process name; specify task affinity etc.; but no luck!!!
>
> So I want to know:
>
> 1. What is difference between startactivity()  and clicking on
> activity from home screen?
> 2. How to invoke Air Application via StartActivity?
>
> Thanks
> Niket

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


Real Estate