You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Luciano Resende <lu...@gmail.com> on 2008/12/21 00:03:48 UTC

Android progress update

Below are some updates on what I have done on Android on the last
couple days...

- Store android sample app : a work in progress store app that runs on
android and consumes the services from Tuscany original store app. It
uses native JSON support from Android and uses JSON-RPC to invoke SCA
services. The catalog piece of this sample is working fine, but we
need to finish up the cart piece, mainly getting a button on the
catalog to add to cart and the logic behind this.

- Android SCA Runtime (host-android / calculator-android) : This is
the effort we started during GSoC, I have made some progress in this
area, and right now I'm in the process of bootstrapping the tuscany
extensions in the host-android (similar to what we had before we
introduced the tuscany extension mechanism) to workaround the Android
limitation that concatenate all jars into a dex file and ignore the
META-INF pieces... this and the fixes on the android jar to allow
QNames should give us some progress on this effort.

There is also a need to get some of these sample apps integrated to
the build environment, and I have looked into this in the past, but
haven't bring the android maven plugin to life yet.

Well, anyone is welcome to help on both directions (the store-android
or Android SCA runtime)...
I'll also start working on this in the next couple days once I get
back from vacation...

-- 
Luciano Resende
Apache Tuscany, Apache PhotArk
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: Android progress update

Posted by Luciano Resende <lu...@gmail.com>.
   I need to check again the exact exception I was having, but what
Adriano is saying seems right... and I think I was trying to debug the
Android code when I started getting side track to other things... Let
me see if I can get back to this over the next couple days...

   BTW, if you want to make some progress, it would be good if we
could make some progress on the store-android as well, which should be
simpler and should not have these blocking issues to be investigated.

On Wed, Mar 4, 2009 at 1:09 PM, Adriano Crestani
<ad...@gmail.com> wrote:
> Hi Oscar,
>
> I think Luciano was getting this error before, it seems that Android VM were
> not being able to load
> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain  due to some
> compilation problem or something that Android VM does not support, but we
> couldn't figure out why :(
>
> Maybe Luciano can give you a better description about the error he was
> getting.
>
> Best Regards,
> Adriano Crestani Campos
>
>
> On Sun, Mar 1, 2009 at 8:13 AM, Oscar Castaneda
> <os...@gmail.com> wrote:
>>
>> Hi Adriano, Luciano,
>>
>> I tested the steps Adriano sent earlier in this thread. Initially I
>> received the same error (related to "--core-library"), but after following
>> [1] I no longer do. Before seeing something in eclipse, I experienced an
>> error where it couldn't find the calculator.apk package. I then found out
>> this was related to a missing .android/debug.keystore, that I suspect
>> disappeared as a result of following [1] (although I'm still not sure).
>>
>> Anyway, currently I am getting the errors shown below. I am getting these
>> errors with and without the jar files for stax-api, which makes me
>> suspicious. I'll continue looking into this and will keep you posted on any
>> findings.
>>
>> 03-01 17:03:08.064: ERROR/AndroidRuntime(805): Uncaught handler: thread
>> main exiting due to uncaught exception
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805): java.lang.VerifyError:
>> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
>> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:183)
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
>> org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:63)
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
>> calculator.android.CalculatorClient.onCreate(CalculatorClient.java:183)
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
>> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1122)
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
>> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2104)
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
>> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2157)
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
>> android.app.ActivityThread.access$1800(ActivityThread.java:112)
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
>> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1581)
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
>> android.os.Handler.dispatchMessage(Handler.java:88)
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
>> android.os.Looper.loop(Looper.java:123)
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
>> android.app.ActivityThread.main(ActivityThread.java:3739)
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
>> java.lang.reflect.Method.invokeNative(Native Method)
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
>> java.lang.reflect.Method.invoke(Method.java:515)
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
>> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
>> dalvik.system.NativeStart.main(Native Method)
>>
>> [1]
>> http://commons.apache.org/scxml/usecases/scxml-stopwatch-on-android.html
>>
>>
>> On Wed, Dec 24, 2008 at 11:40 PM, Luciano Resende <lu...@gmail.com>
>> wrote:
>>>
>>> On Sun, Dec 21, 2008 at 9:53 PM, Adriano Crestani
>>> <ad...@gmail.com> wrote:
>>> > Great Luciano,
>>> >
>>> > I'm trying the code you have commited.
>>> >
>>> > Instructions to get it running:
>>> >
>>> > 1. checkout the Java SCA 1.x from
>>> > https://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.x/,
>>> > compile and
>>> > install it using mvn and etc
>>> >
>>> > 2. import all SCA modules, but tuscany-host-embedded, to your Eclipse
>>> > workspace
>>> >
>>> > 3. rename the tuscany-host-android to tuscany-host-embedded, so you
>>> > don't
>>> > need to fix the other projects that are still referencing
>>> > tuscany-host-embedded instead of tuscany-host-android
>>> >
>>>
>>> Have you tried just updating the calculator-android to use
>>> host-android ? this should avoid this step...
>>>
>>> > 3. Import samples/calculator-android to your workspace
>>> >
>>> > After these three steps, if you run calculator-android, you will get a
>>> > no
>>> > class not found exception when it tries to load XMLInputFactory, whihc
>>> > belongs to stax api. It seems Android eclipse plugin still does not
>>> > include
>>> > automatically the other projects' jar depencencies to Android project.
>>> > So
>>> > you need to add manually the stax-api and stax library jars to the
>>> > Android
>>> > project. Unfortunatelly, when you try to compile it again, it will
>>> > throw
>>> > that error again about not allowing "core" libraries into Android
>>> > applications. It happens because XMLInputFactory is defined in
>>> > javax.xml.stream package, and this package is considered by android
>>> > compiler
>>> > a core library :S
>>> >
>>> > So, here we go again back to this problem :S
>>> >
>>> > Luciano, when you get back from vacation, could you help me recompile
>>> > the
>>> > Android SDK with the stax classes and make it available for everybody?!
>>> > : )
>>> >
>>>
>>> Sorry i can't help now, my laptop broke on the 1st day of vacation :)
>>> and I'm with very limited internet access from hotel library :) I'll
>>> submit the patch to android project once I get back and I'll also try
>>> to make some android.jar available for others to try in the meanwhile.
>>>
>>>
>>> > Best Regards,
>>> > Adriano Crestani
>>> >
>>> >
>>> >
>>> > On Sat, Dec 20, 2008 at 3:03 PM, Luciano Resende <lu...@gmail.com>
>>> > wrote:
>>> >>
>>> >> Below are some updates on what I have done on Android on the last
>>> >> couple days...
>>> >>
>>> >> - Store android sample app : a work in progress store app that runs on
>>> >> android and consumes the services from Tuscany original store app. It
>>> >> uses native JSON support from Android and uses JSON-RPC to invoke SCA
>>> >> services. The catalog piece of this sample is working fine, but we
>>> >> need to finish up the cart piece, mainly getting a button on the
>>> >> catalog to add to cart and the logic behind this.
>>> >>
>>> >> - Android SCA Runtime (host-android / calculator-android) : This is
>>> >> the effort we started during GSoC, I have made some progress in this
>>> >> area, and right now I'm in the process of bootstrapping the tuscany
>>> >> extensions in the host-android (similar to what we had before we
>>> >> introduced the tuscany extension mechanism) to workaround the Android
>>> >> limitation that concatenate all jars into a dex file and ignore the
>>> >> META-INF pieces... this and the fixes on the android jar to allow
>>> >> QNames should give us some progress on this effort.
>>> >>
>>> >> There is also a need to get some of these sample apps integrated to
>>> >> the build environment, and I have looked into this in the past, but
>>> >> haven't bring the android maven plugin to life yet.
>>> >>
>>> >> Well, anyone is welcome to help on both directions (the store-android
>>> >> or Android SCA runtime)...
>>> >> I'll also start working on this in the next couple days once I get
>>> >> back from vacation...
>>> >>
>>> >> --
>>> >> Luciano Resende
>>> >> Apache Tuscany, Apache PhotArk
>>> >> http://people.apache.org/~lresende
>>> >> http://lresende.blogspot.com/
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Luciano Resende
>>> Apache Tuscany, Apache PhotArk
>>> http://people.apache.org/~lresende
>>> http://lresende.blogspot.com/
>>
>>
>>
>> --
>> best,
>> -oscar
>>
>> Oscar Castañeda
>
>



-- 
Luciano Resende
Apache Tuscany, Apache PhotArk
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: Android progress update

Posted by Adriano Crestani <ad...@gmail.com>.
Hi Oscar,

I think Luciano was getting this error before, it seems that Android VM were
not being able to load
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain  due to some
compilation problem or something that Android VM does not support, but we
couldn't figure out why :(

Maybe Luciano can give you a better description about the error he was
getting.

Best Regards,
Adriano Crestani Campos


On Sun, Mar 1, 2009 at 8:13 AM, Oscar Castaneda <
oscar.castaneda.gsoc@gmail.com> wrote:

> Hi Adriano, Luciano,
>
> I tested the steps Adriano sent earlier in this thread. Initially I
> received the same error (related to "--core-library"), but after following
> [1] I no longer do. Before seeing something in eclipse, I experienced an
> error where it couldn't find the calculator.apk package. I then found out
> this was related to a missing .android/debug.keystore, that I suspect
> disappeared as a result of following [1] (although I'm still not sure).
>
> Anyway, currently I am getting the errors shown below. I am getting these
> errors with and without the jar files for stax-api, which makes me
> suspicious. I'll continue looking into this and will keep you posted on any
> findings.
>
> 03-01 17:03:08.064: ERROR/AndroidRuntime(805): Uncaught handler: thread
> main exiting due to uncaught exception
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805): java.lang.VerifyError:
> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:183)
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
> org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:63)
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
> calculator.android.CalculatorClient.onCreate(CalculatorClient.java:183)
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1122)
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2104)
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2157)
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
> android.app.ActivityThread.access$1800(ActivityThread.java:112)
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1581)
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
> android.os.Handler.dispatchMessage(Handler.java:88)
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
> android.os.Looper.loop(Looper.java:123)
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
> android.app.ActivityThread.main(ActivityThread.java:3739)
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
> java.lang.reflect.Method.invoke(Method.java:515)
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
> 03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
> dalvik.system.NativeStart.main(Native Method)
>
> [1]
> http://commons.apache.org/scxml/usecases/scxml-stopwatch-on-android.html
>
>
>
> On Wed, Dec 24, 2008 at 11:40 PM, Luciano Resende <lu...@gmail.com>wrote:
>
>> On Sun, Dec 21, 2008 at 9:53 PM, Adriano Crestani
>> <ad...@gmail.com> wrote:
>> > Great Luciano,
>> >
>> > I'm trying the code you have commited.
>> >
>> > Instructions to get it running:
>> >
>> > 1. checkout the Java SCA 1.x from
>> > https://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.x/,
>> compile and
>> > install it using mvn and etc
>> >
>> > 2. import all SCA modules, but tuscany-host-embedded, to your Eclipse
>> > workspace
>> >
>> > 3. rename the tuscany-host-android to tuscany-host-embedded, so you
>> don't
>> > need to fix the other projects that are still referencing
>> > tuscany-host-embedded instead of tuscany-host-android
>> >
>>
>> Have you tried just updating the calculator-android to use
>> host-android ? this should avoid this step...
>>
>> > 3. Import samples/calculator-android to your workspace
>> >
>> > After these three steps, if you run calculator-android, you will get a
>> no
>> > class not found exception when it tries to load XMLInputFactory, whihc
>> > belongs to stax api. It seems Android eclipse plugin still does not
>> include
>> > automatically the other projects' jar depencencies to Android project.
>> So
>> > you need to add manually the stax-api and stax library jars to the
>> Android
>> > project. Unfortunatelly, when you try to compile it again, it will throw
>> > that error again about not allowing "core" libraries into Android
>> > applications. It happens because XMLInputFactory is defined in
>> > javax.xml.stream package, and this package is considered by android
>> compiler
>> > a core library :S
>> >
>> > So, here we go again back to this problem :S
>> >
>> > Luciano, when you get back from vacation, could you help me recompile
>> the
>> > Android SDK with the stax classes and make it available for everybody?!
>> : )
>> >
>>
>> Sorry i can't help now, my laptop broke on the 1st day of vacation :)
>> and I'm with very limited internet access from hotel library :) I'll
>> submit the patch to android project once I get back and I'll also try
>> to make some android.jar available for others to try in the meanwhile.
>>
>>
>> > Best Regards,
>> > Adriano Crestani
>> >
>> >
>> >
>> > On Sat, Dec 20, 2008 at 3:03 PM, Luciano Resende <lu...@gmail.com>
>> > wrote:
>> >>
>> >> Below are some updates on what I have done on Android on the last
>> >> couple days...
>> >>
>> >> - Store android sample app : a work in progress store app that runs on
>> >> android and consumes the services from Tuscany original store app. It
>> >> uses native JSON support from Android and uses JSON-RPC to invoke SCA
>> >> services. The catalog piece of this sample is working fine, but we
>> >> need to finish up the cart piece, mainly getting a button on the
>> >> catalog to add to cart and the logic behind this.
>> >>
>> >> - Android SCA Runtime (host-android / calculator-android) : This is
>> >> the effort we started during GSoC, I have made some progress in this
>> >> area, and right now I'm in the process of bootstrapping the tuscany
>> >> extensions in the host-android (similar to what we had before we
>> >> introduced the tuscany extension mechanism) to workaround the Android
>> >> limitation that concatenate all jars into a dex file and ignore the
>> >> META-INF pieces... this and the fixes on the android jar to allow
>> >> QNames should give us some progress on this effort.
>> >>
>> >> There is also a need to get some of these sample apps integrated to
>> >> the build environment, and I have looked into this in the past, but
>> >> haven't bring the android maven plugin to life yet.
>> >>
>> >> Well, anyone is welcome to help on both directions (the store-android
>> >> or Android SCA runtime)...
>> >> I'll also start working on this in the next couple days once I get
>> >> back from vacation...
>> >>
>> >> --
>> >> Luciano Resende
>> >> Apache Tuscany, Apache PhotArk
>> >> http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
>> >> http://lresende.blogspot.com/
>> >
>> >
>>
>>
>>
>> --
>> Luciano Resende
>> Apache Tuscany, Apache PhotArk
>> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
>> http://lresende.blogspot.com/
>>
>
>
>
> --
> best,
> -oscar
>
> Oscar Castañeda
>

Re: Android progress update

Posted by Oscar Castaneda <os...@gmail.com>.
Hi Adriano, Luciano,

I tested the steps Adriano sent earlier in this thread. Initially I received
the same error (related to "--core-library"), but after following [1] I no
longer do. Before seeing something in eclipse, I experienced an error where
it couldn't find the calculator.apk package. I then found out this was
related to a missing .android/debug.keystore, that I suspect disappeared as
a result of following [1] (although I'm still not sure).

Anyway, currently I am getting the errors shown below. I am getting these
errors with and without the jar files for stax-api, which makes me
suspicious. I'll continue looking into this and will keep you posted on any
findings.

03-01 17:03:08.064: ERROR/AndroidRuntime(805): Uncaught handler: thread main
exiting due to uncaught exception
03-01 17:03:08.093: ERROR/AndroidRuntime(805): java.lang.VerifyError:
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain
03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:183)
03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:63)
03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
calculator.android.CalculatorClient.onCreate(CalculatorClient.java:183)
03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1122)
03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2104)
03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2157)
03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1581)
03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
android.os.Handler.dispatchMessage(Handler.java:88)
03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
android.os.Looper.loop(Looper.java:123)
03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
android.app.ActivityThread.main(ActivityThread.java:3739)
03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
java.lang.reflect.Method.invokeNative(Native Method)
03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
java.lang.reflect.Method.invoke(Method.java:515)
03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
03-01 17:03:08.093: ERROR/AndroidRuntime(805):     at
dalvik.system.NativeStart.main(Native Method)

[1] http://commons.apache.org/scxml/usecases/scxml-stopwatch-on-android.html


On Wed, Dec 24, 2008 at 11:40 PM, Luciano Resende <lu...@gmail.com>wrote:

> On Sun, Dec 21, 2008 at 9:53 PM, Adriano Crestani
> <ad...@gmail.com> wrote:
> > Great Luciano,
> >
> > I'm trying the code you have commited.
> >
> > Instructions to get it running:
> >
> > 1. checkout the Java SCA 1.x from
> > https://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.x/, compile
> and
> > install it using mvn and etc
> >
> > 2. import all SCA modules, but tuscany-host-embedded, to your Eclipse
> > workspace
> >
> > 3. rename the tuscany-host-android to tuscany-host-embedded, so you don't
> > need to fix the other projects that are still referencing
> > tuscany-host-embedded instead of tuscany-host-android
> >
>
> Have you tried just updating the calculator-android to use
> host-android ? this should avoid this step...
>
> > 3. Import samples/calculator-android to your workspace
> >
> > After these three steps, if you run calculator-android, you will get a no
> > class not found exception when it tries to load XMLInputFactory, whihc
> > belongs to stax api. It seems Android eclipse plugin still does not
> include
> > automatically the other projects' jar depencencies to Android project. So
> > you need to add manually the stax-api and stax library jars to the
> Android
> > project. Unfortunatelly, when you try to compile it again, it will throw
> > that error again about not allowing "core" libraries into Android
> > applications. It happens because XMLInputFactory is defined in
> > javax.xml.stream package, and this package is considered by android
> compiler
> > a core library :S
> >
> > So, here we go again back to this problem :S
> >
> > Luciano, when you get back from vacation, could you help me recompile the
> > Android SDK with the stax classes and make it available for everybody?! :
> )
> >
>
> Sorry i can't help now, my laptop broke on the 1st day of vacation :)
> and I'm with very limited internet access from hotel library :) I'll
> submit the patch to android project once I get back and I'll also try
> to make some android.jar available for others to try in the meanwhile.
>
>
> > Best Regards,
> > Adriano Crestani
> >
> >
> >
> > On Sat, Dec 20, 2008 at 3:03 PM, Luciano Resende <lu...@gmail.com>
> > wrote:
> >>
> >> Below are some updates on what I have done on Android on the last
> >> couple days...
> >>
> >> - Store android sample app : a work in progress store app that runs on
> >> android and consumes the services from Tuscany original store app. It
> >> uses native JSON support from Android and uses JSON-RPC to invoke SCA
> >> services. The catalog piece of this sample is working fine, but we
> >> need to finish up the cart piece, mainly getting a button on the
> >> catalog to add to cart and the logic behind this.
> >>
> >> - Android SCA Runtime (host-android / calculator-android) : This is
> >> the effort we started during GSoC, I have made some progress in this
> >> area, and right now I'm in the process of bootstrapping the tuscany
> >> extensions in the host-android (similar to what we had before we
> >> introduced the tuscany extension mechanism) to workaround the Android
> >> limitation that concatenate all jars into a dex file and ignore the
> >> META-INF pieces... this and the fixes on the android jar to allow
> >> QNames should give us some progress on this effort.
> >>
> >> There is also a need to get some of these sample apps integrated to
> >> the build environment, and I have looked into this in the past, but
> >> haven't bring the android maven plugin to life yet.
> >>
> >> Well, anyone is welcome to help on both directions (the store-android
> >> or Android SCA runtime)...
> >> I'll also start working on this in the next couple days once I get
> >> back from vacation...
> >>
> >> --
> >> Luciano Resende
> >> Apache Tuscany, Apache PhotArk
> >> http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> >> http://lresende.blogspot.com/
> >
> >
>
>
>
> --
> Luciano Resende
> Apache Tuscany, Apache PhotArk
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>



-- 
best,
-oscar

Oscar Castañeda

Re: Android progress update

Posted by Luciano Resende <lu...@gmail.com>.
On Sun, Dec 21, 2008 at 9:53 PM, Adriano Crestani
<ad...@gmail.com> wrote:
> Great Luciano,
>
> I'm trying the code you have commited.
>
> Instructions to get it running:
>
> 1. checkout the Java SCA 1.x from
> https://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.x/, compile and
> install it using mvn and etc
>
> 2. import all SCA modules, but tuscany-host-embedded, to your Eclipse
> workspace
>
> 3. rename the tuscany-host-android to tuscany-host-embedded, so you don't
> need to fix the other projects that are still referencing
> tuscany-host-embedded instead of tuscany-host-android
>

Have you tried just updating the calculator-android to use
host-android ? this should avoid this step...

> 3. Import samples/calculator-android to your workspace
>
> After these three steps, if you run calculator-android, you will get a no
> class not found exception when it tries to load XMLInputFactory, whihc
> belongs to stax api. It seems Android eclipse plugin still does not include
> automatically the other projects' jar depencencies to Android project. So
> you need to add manually the stax-api and stax library jars to the Android
> project. Unfortunatelly, when you try to compile it again, it will throw
> that error again about not allowing "core" libraries into Android
> applications. It happens because XMLInputFactory is defined in
> javax.xml.stream package, and this package is considered by android compiler
> a core library :S
>
> So, here we go again back to this problem :S
>
> Luciano, when you get back from vacation, could you help me recompile the
> Android SDK with the stax classes and make it available for everybody?! : )
>

Sorry i can't help now, my laptop broke on the 1st day of vacation :)
and I'm with very limited internet access from hotel library :) I'll
submit the patch to android project once I get back and I'll also try
to make some android.jar available for others to try in the meanwhile.


> Best Regards,
> Adriano Crestani
>
>
>
> On Sat, Dec 20, 2008 at 3:03 PM, Luciano Resende <lu...@gmail.com>
> wrote:
>>
>> Below are some updates on what I have done on Android on the last
>> couple days...
>>
>> - Store android sample app : a work in progress store app that runs on
>> android and consumes the services from Tuscany original store app. It
>> uses native JSON support from Android and uses JSON-RPC to invoke SCA
>> services. The catalog piece of this sample is working fine, but we
>> need to finish up the cart piece, mainly getting a button on the
>> catalog to add to cart and the logic behind this.
>>
>> - Android SCA Runtime (host-android / calculator-android) : This is
>> the effort we started during GSoC, I have made some progress in this
>> area, and right now I'm in the process of bootstrapping the tuscany
>> extensions in the host-android (similar to what we had before we
>> introduced the tuscany extension mechanism) to workaround the Android
>> limitation that concatenate all jars into a dex file and ignore the
>> META-INF pieces... this and the fixes on the android jar to allow
>> QNames should give us some progress on this effort.
>>
>> There is also a need to get some of these sample apps integrated to
>> the build environment, and I have looked into this in the past, but
>> haven't bring the android maven plugin to life yet.
>>
>> Well, anyone is welcome to help on both directions (the store-android
>> or Android SCA runtime)...
>> I'll also start working on this in the next couple days once I get
>> back from vacation...
>>
>> --
>> Luciano Resende
>> Apache Tuscany, Apache PhotArk
>> http://people.apache.org/~lresende
>> http://lresende.blogspot.com/
>
>



-- 
Luciano Resende
Apache Tuscany, Apache PhotArk
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: Android progress update

Posted by Adriano Crestani <ad...@gmail.com>.
Ah, I also needed to set manually the ContextClassLoader, because it's not
set automatically by Android when the app thread is created. For now I added
a code in calculator-android that sets it manually. The modifications is
already commited ; )

Adriano Crestani

On Sun, Dec 21, 2008 at 9:53 PM, Adriano Crestani <adrianocrestani@gmail.com
> wrote:

> Great Luciano,
>
> I'm trying the code you have commited.
>
> Instructions to get it running:
>
> 1. checkout the Java SCA 1.x from
> https://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.x/, compile
> and install it using mvn and etc
>
> 2. import all SCA modules, but tuscany-host-embedded, to your Eclipse
> workspace
>
> 3. rename the tuscany-host-android to tuscany-host-embedded, so you don't
> need to fix the other projects that are still referencing
> tuscany-host-embedded instead of tuscany-host-android
>
> 3. Import samples/calculator-android to your workspace
>
> After these three steps, if you run calculator-android, you will get a no
> class not found exception when it tries to load XMLInputFactory, whihc
> belongs to stax api. It seems Android eclipse plugin still does not include
> automatically the other projects' jar depencencies to Android project. So
> you need to add manually the stax-api and stax library jars to the Android
> project. Unfortunatelly, when you try to compile it again, it will throw
> that error again about not allowing "core" libraries into Android
> applications. It happens because XMLInputFactory is defined in
> javax.xml.stream package, and this package is considered by android compiler
> a core library :S
>
> So, here we go again back to this problem :S
>
> Luciano, when you get back from vacation, could you help me recompile the
> Android SDK with the stax classes and make it available for everybody?! : )
>
> Best Regards,
> Adriano Crestani
>
>
>
>
> On Sat, Dec 20, 2008 at 3:03 PM, Luciano Resende <lu...@gmail.com>wrote:
>
>> Below are some updates on what I have done on Android on the last
>> couple days...
>>
>> - Store android sample app : a work in progress store app that runs on
>> android and consumes the services from Tuscany original store app. It
>> uses native JSON support from Android and uses JSON-RPC to invoke SCA
>> services. The catalog piece of this sample is working fine, but we
>> need to finish up the cart piece, mainly getting a button on the
>> catalog to add to cart and the logic behind this.
>>
>> - Android SCA Runtime (host-android / calculator-android) : This is
>> the effort we started during GSoC, I have made some progress in this
>> area, and right now I'm in the process of bootstrapping the tuscany
>> extensions in the host-android (similar to what we had before we
>> introduced the tuscany extension mechanism) to workaround the Android
>> limitation that concatenate all jars into a dex file and ignore the
>> META-INF pieces... this and the fixes on the android jar to allow
>> QNames should give us some progress on this effort.
>>
>> There is also a need to get some of these sample apps integrated to
>> the build environment, and I have looked into this in the past, but
>> haven't bring the android maven plugin to life yet.
>>
>> Well, anyone is welcome to help on both directions (the store-android
>> or Android SCA runtime)...
>> I'll also start working on this in the next couple days once I get
>> back from vacation...
>>
>> --
>> Luciano Resende
>> Apache Tuscany, Apache PhotArk
>> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
>> http://lresende.blogspot.com/
>>
>
>

Re: Android progress update

Posted by Adriano Crestani <ad...@gmail.com>.
Great Luciano,

I'm trying the code you have commited.

Instructions to get it running:

1. checkout the Java SCA 1.x from
https://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.x/, compile and
install it using mvn and etc

2. import all SCA modules, but tuscany-host-embedded, to your Eclipse
workspace

3. rename the tuscany-host-android to tuscany-host-embedded, so you don't
need to fix the other projects that are still referencing
tuscany-host-embedded instead of tuscany-host-android

3. Import samples/calculator-android to your workspace

After these three steps, if you run calculator-android, you will get a no
class not found exception when it tries to load XMLInputFactory, whihc
belongs to stax api. It seems Android eclipse plugin still does not include
automatically the other projects' jar depencencies to Android project. So
you need to add manually the stax-api and stax library jars to the Android
project. Unfortunatelly, when you try to compile it again, it will throw
that error again about not allowing "core" libraries into Android
applications. It happens because XMLInputFactory is defined in
javax.xml.stream package, and this package is considered by android compiler
a core library :S

So, here we go again back to this problem :S

Luciano, when you get back from vacation, could you help me recompile the
Android SDK with the stax classes and make it available for everybody?! : )

Best Regards,
Adriano Crestani



On Sat, Dec 20, 2008 at 3:03 PM, Luciano Resende <lu...@gmail.com>wrote:

> Below are some updates on what I have done on Android on the last
> couple days...
>
> - Store android sample app : a work in progress store app that runs on
> android and consumes the services from Tuscany original store app. It
> uses native JSON support from Android and uses JSON-RPC to invoke SCA
> services. The catalog piece of this sample is working fine, but we
> need to finish up the cart piece, mainly getting a button on the
> catalog to add to cart and the logic behind this.
>
> - Android SCA Runtime (host-android / calculator-android) : This is
> the effort we started during GSoC, I have made some progress in this
> area, and right now I'm in the process of bootstrapping the tuscany
> extensions in the host-android (similar to what we had before we
> introduced the tuscany extension mechanism) to workaround the Android
> limitation that concatenate all jars into a dex file and ignore the
> META-INF pieces... this and the fixes on the android jar to allow
> QNames should give us some progress on this effort.
>
> There is also a need to get some of these sample apps integrated to
> the build environment, and I have looked into this in the past, but
> haven't bring the android maven plugin to life yet.
>
> Well, anyone is welcome to help on both directions (the store-android
> or Android SCA runtime)...
> I'll also start working on this in the next couple days once I get
> back from vacation...
>
> --
> Luciano Resende
> Apache Tuscany, Apache PhotArk
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>