App Inventor Java Bridge.

Showing 21-109 of 109 messages
App Inventor Java Bridge. Mark Friedman 5/27/11 9:58 AM
We would like to announce the initial, alpha, version of the App Inventor Java Bridge.  Please note that this is a very early version of this and we expect some glitches.  We also expect that it may change fairly significantly as we work out the kinks.  We would greatly appreciate your feedback on the mechanism, code and the documentation.

The Google App Inventor Java Bridge

The App Inventor Java Bridge helps make a transition from developing Android applications with App Inventor for Android, to developing with Java and the Android SDK.  It lets you incorporate App Inventor components into apps that you create in Java with the standard Android SDK tools.  If you’ve been using App Inventor and know some Java, then the Java Bridge is a good way to get started with the SDK, because building with App Inventor components hides many of the complexities of the Android framework.   As you gain experience, you can switch over to regular SDK development and create apps that harness the full power of Android.

For entry-level computing courses that use App Inventor, introducing the Bridge in conjunction with a first look at Java, can give students a preview of more advanced material.  The Bridge can also be valuable in advanced courses, where students are already experienced with programming:  Begin with App Inventor to illustrate the basic ideas of mobile app development, and let students start building apps right away.   Then introduce the Bridge and have students build apps in Java with the App Inventor components.  Later, ease in to the details of the Android framework and advanced topics in mobile development.

The Bridge consists of three parts:
  1. A sample project, BridgeToJava, that implements a tiny app using a few components.   The comments in the source code for BridgeSample.java provide rudimentary documentation for coding using the Bridge.
  2. A compiled jar file, libSimpleAndroidRuntime.jar, which contains all the App Inventor component classes.   Include this as a library with your Java projects in order to use the components.
  3. The source code for all the App Inventor components.  You don’t need this to build apps with the Bridge, but you can consult it as a reference to see how to call the component classes from Java code.  And you can also use the code as a model for building your own components.

Using the Bridge

To use the Bridge, you’ll need to install the Android SDK, set up a development environment and verify that you can build and run Android projects.  You can do this by going through the Hello World setup process and tutorial example on the Android Developer site.

To get started with the Bridge, download the sample project from the App-Inventor-for-Android project at code.google.com.   You can download the project source code with svn (subversion):  Connect to a directory where you typically keep Java projects and issue the command:


This should create a BridgeToJava folder on your computer, with all the files required to build the app.

To build the BridgeToJava sample project using Eclipse, use the New / Android Project, select “Create project from existing source” and enter the location of the BridgeToJava directory.  Verify that you can build run the BridgeSample  project.  

To build the BridgeToJava sample at a command line using Ant, first cd to the BridgeToJava directory.  Then run

android update project -p .


where android is a command found in the tools directory of your install Android sdk.  Then you should be able to run:

ant debug


or “ant release”, if your prefer.

Notice that the project folder has a libs/ subfolder that contains the libSimpleAndroidRuntime.jar library. If you create your own project that uses the Bridge you’ll want to create a similar libs directory and put libSimpleAndroidRuntime.jar in there. You should always be able to get the latest version of in http://code.google.com/p/app-inventor-for-android/source/browse/trunk/jars/

For documentation, see the BridgeSample.java source file.   Try changing the code to build some variants of the app.  To see how to use other App Inventor components, see the java source code the components, which is in the App-Inventor-for-Android project at http://code.google.com/p/app-inventor-for-android/source/browse/trunk/src/components.


Re: App Inventor Java Bridge. Mark Friedman 5/27/11 10:04 AM
Note that the documentation below can also be found in the README file in the BridgeToJava sample directory on the App Inventor code site.

-Mark
Re: App Inventor Java Bridge. Richard Fields II 5/27/11 3:44 PM

Well done mark!!  Well done!

On May 27, 2011 1:05 PM, "Mark Friedman" <ma...@google.com> wrote:
> Note that the documentation below can also be found in the
> README<http://app-inventor-for-android.googlecode.com/svn/trunk/samples/BridgeToJava/README>file

> in the BridgeToJava
> sample directory
> <http://code.google.com/p/app-inventor-for-android/source/browse/trunk/samples/BridgeToJava>on>> 1. A sample project, BridgeToJava, that implements a tiny app using a

>> few components. The comments in the source code for BridgeSample.java
>> provide rudimentary documentation for coding using the Bridge.
>> 2. A compiled jar file, libSimpleAndroidRuntime.jar, which contains all

>> the App Inventor component classes. Include this as a library with your
>> Java projects in order to use the components.
>> 3. The source code for all the App Inventor components. You don’t need

>> this to build apps with the Bridge, but you can consult it as a reference to
>> see how to call the component classes from Java code. And you can also use
>> the code as a model for building your own components.
>>
>> Using the Bridge To use the Bridge, you’ll need to install the Android
>> SDK, set up a development environment and verify that you can build and
>> run Android projects. You can do this by going through the Hello World<http://developer.android.com/resources/tutorials/hello-world.html>setup process and tutorial example on the Android Developer site.

>>
>> To get started with the Bridge, download the sample project from the App-Inventor-for-Android
>> project at code.google.com<http://code.google.com/p/app-inventor-for-android/source/browse/trunk/>.>> http://code.google.com/p/app-inventor-for-android/source/browse/trunk/src/components.<http://code.google.com/p/app-inventor-for-android/source/browse/trunk/src/components>
>>
>>
>>
Re: App Inventor Java Bridge. Mark Friedman 5/27/11 5:31 PM
Thanks, Ra.  Let us know how it goes if you try it out.  That's equally true for everyone in this group.

-Mark
Re: App Inventor Java Bridge. Robert 5/27/11 6:08 PM
Sounds very interesting... I'll take one of the apps that I already moved from AI to the SDK and run it through then compare the result to what I did by hand.   In any case it'll be a good jumping off point for then further optimization and enhancement in the SDK.

Robert
Re: App Inventor Java Bridge. jwtyler 5/29/11 2:59 PM
I cant believe I missed this announcement. I am too busy. This is wildly amazing. I had no idea you guys were going to be doing this.  Wow, this is huge for those of us teaching programming concepts. 
Many kudos team!
Jason W. Tyler
Husband, Father, Student, Professional Technical Instructor, Author of Google AppInventor for Android.
MCSE, MCITP:EA, CCNA, ITILv3, MCTSx9 ,MCT, A+, Network+, Security+,Server+, MCITP: Exchange, 
Twitter: @jwtyler




On Fri, May 27, 2011 at 12:58 PM, Mark Friedman <ma...@google.com> wrote:

Re: App Inventor Java Bridge. David Johnston 5/29/11 10:54 PM
I am blown away that I did not catch the announcement. Maybe an
announcement should be remade in all thr AI forums. This is a super
smart move I can't wait too test what can be done here. I am so
excited I don't know if I will be able to sleep!

Does this mean we can have current apps converted over? What are the
implications of this? What are some of the limitations in the AI issue
list that this allows developers to solve?

On May 29, 2:59 pm, Jason Tyler <jwty...@gmail.com> wrote:
> I cant believe I missed this announcement. I am too busy. This is wildly
> amazing. I had no idea you guys were going to be doing this.  Wow, this is
> huge for those of us teaching programming concepts.
> Many kudos team!
> *Jason W. Tyler
> *Husband, Father, Student, Professional Technical Instructor, Author of
> Google AppInventor for Android.
> MCSE, MCITP:EA, CCNA, ITILv3, MCTSx9 ,MCT, A+, Network+, Security+,Server+,
> MCITP: Exchange,http://Android.jwtyler.com/<http://android.jwtyler.com/>
> Twitter: @jwtyler <http://twitter.com/#!/jwtyler>
> App Inventor for Android: Build your own apps - no experience
> required!<http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http://www.am...>
> >    1. A sample project, BridgeToJava, that implements a tiny app using a
> >    few components.   The comments in the source code for BridgeSample.java
> >    provide rudimentary documentation for coding using the Bridge.
> >    2. A compiled jar file, libSimpleAndroidRuntime.jar, which contains all
> >    the App Inventor component classes.   Include this as a library with your
> >    Java projects in order to use the components.
> >    3. The source code for all the App Inventor components.  You don’t need
> >    this to build apps with the Bridge, but you can consult it as a reference to
> >    see how to call the component classes from Java code.  And you can also use
> >    the code as a model for building your own components.
>
> > Using the Bridge To use the Bridge, you’ll need to install the Android
> > SDK, set up a development environment and verify that you can build and
> > run Android projects.  You can do this by going through the Hello World<http://developer.android.com/resources/tutorials/hello-world.html>setup process and tutorial example on the Android Developer site.
>
> > To get started with the Bridge, download the sample project from the App-Inventor-for-Android
> > project at code.google.com<http://code.google.com/p/app-inventor-for-android/source/browse/trunk/>.
> >   You can download the project source code with svn (subversion):  Connect
> > to a directory where you typically keep Java projects and issue the command:
>
> > svn co
> >http://app-inventor-for-android.googlecode.com/svn/trunk/samples/Brid...
>
> > This should create a BridgeToJava folder on your computer, with all the
> > files required to build the app.
>
> > To build the BridgeToJava sample project using Eclipse, use the New /
> > Android Project, select “Create project from existing source” and enter the
> > location of the BridgeToJava directory.  Verify that you can build run the
> > BridgeSample  project.
>
> > To build the BridgeToJava sample at a command line using Ant, first cd to
> > the BridgeToJava directory.  Then run
>
> > android update project -p .
>
> > where android is a command found in the tools directory of your install
> > Android sdk.  Then you should be able to run:
>
> > ant debug
>
> > or “ant release”, if your prefer.
>
> > Notice that the project folder has a libs/ subfolder that contains the
> > libSimpleAndroidRuntime.jar library. If you create your own project that
> > uses the Bridge you’ll want to create a similar libs directory and put
> > libSimpleAndroidRuntime.jar in there. You should always be able to get the
> > latest version of in
> >http://code.google.com/p/app-inventor-for-android/source/browse/trunk...
>
> > For documentation, see the BridgeSample.java source file.   Try changing
> > the code to build some variants of the app.  To see how to use other App
> > Inventor components, see the java source code the components, which is in
> > the App-Inventor-for-Android project at
> >http://code.google.com/p/app-inventor-for-android/source/browse/trunk....<http://code.google.com/p/app-inventor-for-android/source/browse/trunk...>
Re: App Inventor Java Bridge. David Johnston 5/29/11 11:09 PM
Im wondering if we will be able to use the same awesome visual coding
tools?

On May 29, 10:54 pm, David Johnston <optimizationtutor....@gmail.com>
wrote:
Re: App Inventor Java Bridge. David Johnston 5/30/11 1:21 PM
After looking at it, this is really difficult. I got the app test to
run on my phone but Eclipse says there are a few errors. Not sure how
to fix.

I think it would be awesome if the normal AI Block Editor was an
Eclipse plugin. That would be the coolest thing ever! I can't seem to
comprehend code that well without the visual Block Editor.

On May 29, 11:09 pm, David Johnston <optimizationtutor....@gmail.com>
Re: App Inventor Java Bridge. Dan Ebeling 5/30/11 1:54 PM

Well, from your post your brain hasn't exploded so your in great shape so far

Re: App Inventor Java Bridge. Mark Friedman 5/31/11 10:46 AM
For now, I'd like to keep this mostly in this smaller group.  This first version of the Java Bridge is really more of an experimental, alpha version.  The members of this educators group is mostly comprised of CS teachers who, presumably, can deal with the inevitable issues and provide coherent feedback.

-Mark

On Sun, May 29, 2011 at 10:54 PM, David Johnston <optimizationtutor.com@gmail.com> wrote:
... Maybe an announcement should be remade in all thr AI forums. 
Re: App Inventor Java Bridge. Imp Inc. 6/17/11 7:03 AM
Great job, Mark (and anyone else who was involved)!!! This paired with app inventor are great tools for developing, and also to learn java. While I've seen plenty of code in my day, I never learned any OOP language enough to actually write it. It took me a few days to wrap my head around things, and I've still got more to learn, but I'm actually progressing on my app now. Thank you so much!

It's great having the source code for the components to see how things are actually done. This is a GREAT learning tool!

Keep up the good work!

Re: App Inventor Java Bridge. M. Hossein Amerkashi 6/22/11 1:41 PM
Love it.
Thanks Mark and team.

-M. Hossein Amerkashi
Re: App Inventor Java Bridge. M. Hossein Amerkashi 6/23/11 2:54 PM
AI team, this is great and I was able to get the sample bridge working.

Question: Are there additional functionalities included in the runtime components that AI does not currently have? I looked at couple components (e.g. Clock, Button) and saw the same methods. Is the plan to keep AI and component lib / jar synced?

Thanks,
M. Hossein Amerkashi

Re: App Inventor Java Bridge. Mark Friedman 6/23/11 4:52 PM
The plan is to keep them more-or-less synced.

-Mark
Mark Friedman | Google | Manager and Tech Lead, App Inventor for Android | ma...@google.com
unk...@googlegroups.com 6/24/11 8:22 AM <This message has been deleted.>
Re: App Inventor Java Bridge. Cody Henrichsen 6/24/11 8:26 AM
Hey,

I am teaching a conference in July on AppInventor/Eclipse development for this in the classroom.  I will definitely be trying this out with the teachers at the conference.  I hope to have a lot of better transitioning with this option.  I would love to have discussion on this.

Cody
Re: App Inventor Java Bridge. Jeff Gray 6/26/11 3:23 AM

Hi all

Two days ago, we just finished a camp for high school students and
used AI as the focus (we had three weeks of camps, with our third week
focused on AI).

Our approach was to use the traditional block-oriented language of AI
for the first two days to get students comfortable. We then
transitioned them over to the Java bridge.

A visiting student (Josh Swank) is working with me this summer. Josh
has translated may of the examples in Dave's books over to Java using
the bridge. We hope to have Josh share all of that very soon.

Our approach was as follows:

- Introduce students to AI components and general Android topics on
Mon/Tue. Students code up about 5-6 of the examples in Dave's book (we
purchased copies and gave to all students)
- Show the students a few examples of how we translated those same
apps to Java, going over a "template" for doing that in terms of
setting up the GUI, establishing the events, and coding each handler
in Java.
- On Thu/Fri, students spent the days working on their own apps (we
will share this on our camp page soon).

Because of the background of some of the students (some had AP CS and
really comfortable with Java, and others were just exposed to Java in
an earlier week of camp), we had a mixture of students do their final
project in both the block-oriented and JavaBridge approaches for AI.

I think showing the students the block version first, and then
establishing a mapping of the same program to Java, was very helpful
to the students.


BTW: Josh is also working on a neat project that we hope to tell you
about soon in relation to an AI to Java converter....

Jeff
http://www.cs.ua.edu/~gray

On Jun 24, 10:26 am, Cody Henrichsen <cody.henrich...@gmail.com>
wrote:
Re: App Inventor Java Bridge. Gary Frederick 6/27/11 4:51 AM
I have not done more than d/l the project and looking for a few minutes. sigh

What does it take to use a component I make with App Inventor?
Can it be done currently?

Gary
This message has been hidden because it was flagged for abuse.
Re: App Inventor Java Bridge. Gary Frederick 6/27/11 5:56 AM
Just as well, I do not need more temptation to take me away from what I am doing. So many interesting projects, 24 hours in the day...

Gary
Re: App Inventor Java Bridge. M. Hossein Amerkashi 7/5/11 8:53 AM
Hello Mark,

Is the API available anywhere? Also, any other examples on using other components? I'm trying to use the ListPicker and am running into some issues, because its apparently looking for other dependent jar files such as gnu.lists. I think I have to use YailList to makeList, but am not sure if I'm coding it right. I tried to find matching AI methods (list from csv), but was not able to find one.

You assistance on API and other component examples are greatly appreciated.

Thanks,
M. Hossein Amerkashi
http://Amerkashi.Wordpress.com
Re: App Inventor Java Bridge. M. Hossein Amerkashi 7/5/11 12:32 PM
Hi,

I was able to get the listpicker working. However, examples of using other components would really be nice (of course when AI team has time to do so).

If anyone is interested, I created the components API and placed here: http://www.3nportal.com/AIBridgeAPI
Re: App Inventor Java Bridge. Mark Friedman 7/6/11 11:10 AM
Hossein,

  Thanks for generating the JavaDoc for the components.  For the benefit of others in the same position, could you describe how you got the listpicker to work.  I'm actually a little bit surprised that you were able to do it without an additional library jar (that we forgot to provide).

-Mark
Mark Friedman | Google | Manager and Tech Lead, App Inventor for Android | ma...@google.com



Re: App Inventor Java Bridge. M. Hossein Amerkashi 7/6/11 12:32 PM
Mark,

I did have to find and use the kawa library jar.
Here is the link to my HowTo - JavaBridge thread that shows how to use the ListPicker. This is a trim down version that shows only listpicker.

If anyone interested, this link shows additional HowTos (AI not Java) such as using lists, fusiontables, canvas, adding ads, etc.

I think AI is both excellent and fun to use and develop apps. Thanks AI team for all the great effort.
Re: App Inventor Java Bridge. Gary Frederick 7/7/11 9:46 AM
Mark,

On Wednesday, July 6, 2011 1:10:10 PM UTC-5, Mark Friedman wrote:
Hossein,

  Thanks for generating the JavaDoc for the components.  For the benefit of others in the same position, could you describe how you got the listpicker to work.  I'm actually a little bit surprised that you were able to do it without an additional library jar (that we forgot to provide).

Will you add the library jar to your project?

Is this the one we should get? ftp://ftp.gnu.org/pub/gnu/kawa/kawa-1.11.jar


Hossein,

Did you have to get any other jars?

Gary
Re: App Inventor Java Bridge. M. Hossein Amerkashi 7/7/11 9:53 AM
Gary,

kawa was the only library that I used for ListPicker. I used kawa-1.9.90.jar

-M. Hossein Amerkashi
http://Amerkashi.Wordpress.com
Re: App Inventor Java Bridge. Gary Frederick 7/7/11 11:12 AM
:-)

1.11 is the latest on the kawa site. I'll say if it does not work.

I'm looking at the android listpicker example 
and comparing it to your example.

Gary


Re: App Inventor Java Bridge. Mark Friedman 7/7/11 11:11 AM
We'll add the appropriate Kawa jar soon.  In the meantime it looks like either the jar you mention or the one Hossein mentioned will work.

-Mark
Mark Friedman | Google | Manager and Tech Lead, App Inventor for Android | ma...@google.com
Re: App Inventor Java Bridge. Gary Frederick 7/8/11 3:47 AM
Very nice. I do not think I could have dug out what to do without your example Hossein.

I added the kawa.jar to the lib folder and told the project to add that external jar.

I took the body of your code Hossein and replaced the body of the original example. 

I also added an intent for the listpicker to the manifest. Here is what the expanded manifest looks like in my example:

    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".BridgeSample"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="com.google.devtools.simple.runtime.components.android.ListPickerActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>


and, on my Windows 7 64bit with 4Gb memory I had to change the eclipse.ini??? It is this in part

...
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-XX:MaxPermSize=512m
-Xms512m
-Xmx1024m


woo hoo

and I have to go out and can not do more this morning :-)

Thanks

Gary

Re: App Inventor Java Bridge. Imp Inc. 7/10/11 9:34 AM
I downloaded the kawa jar file last night. First tried the svn, and after it just hung on me, I downloaded the 1.1 version. This ruined eclipse! Heh, as soon as I added it to the build path, the whole environment got slow and sluggish, reminding me of working in the blocks editor. Then I saw the size...app inventor jar file = 493KB, the kawa file is 2.8MB. I think I'll be staying away from that library. I hope when you guys include it on the next release that it is a seperate jar file.

I know some of the stuff you use uses the kawa libraries, but I'll find alternate ways of doing things. I do NOT want to go back to that slowness again!
Re: App Inventor Java Bridge. M. Hossein Amerkashi 7/10/11 9:41 AM
If I'm not mistaken, currently, if we want to use ListPicker, that would be the only way.

M. Hossein Amerkashi
http://Amerkashi.Wordpress.com
unk...@googlegroups.com 7/10/11 9:41 AM <This message has been deleted.>
Re: App Inventor Java Bridge. Imp Inc. 7/10/11 9:59 AM
For using the app inventor version, yes. But ListPicker Activity extends ListAcitivity, and ListPicker extends Picker. It's a matter of learning how to use the built in android version. As I go through the AI tutorials, I am going to figure out how to do them without using that kawa library, and they will be commented as necessary.

I'm working on the noTextwhiledriving app now. The TinyDB component uses the kawa library, so I will show how to store things to a binary file instead.

I may work on getting the listpicker to work without the kawa library next.

Re: App Inventor Java Bridge. M. Hossein Amerkashi 7/10/11 12:08 PM
You are right, but I thought this is gradual move from AI designer / blocks to SDK using AI runtime components.

Here is the class hierarchy:
java.lang.Object
  extended by com.google.devtools.simple.runtime.components.VisibleComponent
      extended by com.google.devtools.simple.runtime.components.android.AndroidViewComponent
          extended by com.google.devtools.simple.runtime.components.android.ButtonBase
              extended by com.google.devtools.simple.runtime.components.android.Picker
                  extended by com.google.devtools.simple.runtime.components.android.ListPicker

Re: App Inventor Java Bridge. M. Hossein Amerkashi 7/10/11 12:22 PM
BTW, forgot to mention that ONLY classes that are needed will be used (packed) into final .apk file.

For comparison, the ListPicker using JavaBridge, creates an apk that is 215k. I created the exact same in App Inventor using designer / block and the size is 1.2MB.
Re: Re: App Inventor Java Bridge. Saj 7/10/11 4:37 PM
Yea, it's because AI loads all resources even you don't use them. Hossein, I would suggest you to move to SDK as you are already ok with the bridge. Good work.
This message has been hidden because it was flagged for abuse.
Re: Re: App Inventor Java Bridge. M. Hossein Amerkashi 7/10/11 5:00 PM
Hal,

I think you are confirming what I said HERE?
This message has been hidden because it was flagged for abuse.
Re: App Inventor Java Bridge. Imp Inc. 7/10/11 10:38 PM
Mark,

 Just in case you're interested, I've posted the source for making the listpicker work without getting the Kawa library. I'm curious though. Why use yaillist instead of an arraylist? Or better yet, a string array?

The download link is HERE .

Ryan Bis
www.xiledsystems.com
Re: App Inventor Java Bridge. Gary Frederick 7/11/11 5:54 AM
I had the same question. If a goal with the Bridge is learning Java, it would be better to use good ol Java. You can always add Kawa later
  or when you are packaging for App Inventor :-)

Now to go look at Ryan's source.

Gary
Re: App Inventor Java Bridge. Mark Friedman 7/11/11 7:48 AM
The goal of the Java Bridge is to help learn Java, while using App Inventor's components and event handling mechanism.  Given App Inventor's general reliance on Kawa, we haven't gone to any extra effort to try and extricate the components from any Kawa dependencies.   It might be interesting to try and do so in the future.

-Mark
Mark Friedman | Google | Manager and Tech Lead, App Inventor for Android | ma...@google.com



Re: App Inventor Java Bridge. Imp Inc. 7/11/11 8:11 AM
Well, you guys (and gals) have done an excellent job. Between AI itself, and the JavaBridge, I've learned a great amount in a relatively short amount of time. I'm glad you didn't extricate the components from the Kawa dependencies in a way. It forces me to learn more :)

- Ryan

Re: App Inventor Java Bridge. Gary Frederick 7/11/11 8:23 AM
!!!

I have been mulling over comments about the Bridge and learning Java.

Some of the things I like about App Inventor

good separation of design and code
onClick is a very good way to get started on events
the blocks help guide you to correct syntax
students have a quick uptake of the basics
playing has a fast turnaround
not a lot of complexity to build a useful app

I can see the Bridge as useful once you have played with App Inventor, but wonder how many would use it as THE step to Java and may miss learning some of the benefits of using Java and similar languages.

Sooo

Mark,
Can you give some input on the community building a version that is Kawa free?

=====
I would be sad if a Kawa free version slowed down progress to the Component Development Kit

or any work getting an Open Blocks version that ran in eclipse and generated android SDK OR App Inventor files :-)

Gary


a good post by mark from a while ago 
https://groups.google.com/forum/#!msg/appinventor/hNjm2ZZmRYM/ZHc2b8HfuBIJ
Re: App Inventor Java Bridge. Imp Inc. 7/11/11 9:49 AM
I've been thinking of making a library for app inventor components which don't use the Kawa library. I already converted the ListPicker over. I guess it all depends on how complex some of the other components are.


Re: App Inventor Java Bridge. Gary Frederick 7/11/11 10:16 AM
Let's do it such that if there is a good reason to have versions both with and without, we are good to go.

Gary
Re: App Inventor Java Bridge. Imp Inc. 7/11/11 10:32 AM
Well, it would be a seperate library that people would have to download and install. Unless the guys and gals at Google put the modified versions within the javabridge jar file.

I suppose it's still worth it as I can't even use the Kawa library because of how much my system slows down when just adding it to the build path. The seperate library would be much smaller.

I suppose I will start with two things to put into the library, and keep building from there. I already have the ListPicker and ListPickerActivity I can put in there, I think I'll try to convert TinyDB over as well, and see how it goes.

Re: App Inventor Java Bridge. Dan Ebeling 7/11/11 12:21 PM
Ryan, can you do a tutorial on the ai text group tutorial and I would be eternally grateful, thank you for taking this bull by the horns, thanks, dan
Re: App Inventor Java Bridge. Gary Frederick 7/11/11 12:41 PM
I just posted about Google+ in the coffee shop. https://groups.google.com/d/topic/appinventor/BPoM5Wzk3sU/discussion
  
I was thinking of circles for those of us that are interested in the Bridge and another for those that make it into the testing group. Google+ is more than circles, and it should be a good way for us to help each other learn.

I have been looking at my SDK stuff the last few days. I am about ready to start working on components that does what my asUtil app does. Theory is that when Google releases the  Component Development Kit, the code makes it easy to incorporate.

Soo, I'm going to follow up with my code and see where that takes me. I am interested in working with others interested in file i/o or the date or time views
  or my multi level listpicker
  or ...
in a Circle or out, I'll talk to most everyone :-P

Gary
Re: App Inventor Java Bridge. Gary Frederick 7/11/11 1:00 PM
Re: App Inventor Java Bridge. Imp Inc. 7/11/11 1:03 PM
Honestly, I'd much rather see a dedicated forum. Maybe an irc chat room as well. I'm not big on the facebook/myspace/google+ type sites.

But I would love to chat about this stuff. I think JavaBridge needs its own forum (of the general sense) for people to discuss things.

Ryan

Re: App Inventor Java Bridge. Gary Frederick 7/11/11 1:27 PM
It's not an either/or thing. I do not do much with facebook etc. who knows if Google+ will be a good way to work with others.

I looked at the Web java source, I will look at the TinyWebDB source soon and see how it handles the return.

Gary




Re: App Inventor Java Bridge. Imp Inc. 7/11/11 1:29 PM
Ok, just wanted to make sure I wouldn't be left out if I didn't join Google+ :P.

Oh, if you convert over any components, you can send me the java file, and I'll include it in the library I posted.

Ryan

Re: App Inventor Java Bridge. Gary Frederick 7/11/11 1:53 PM
I'll probably put it with all my other source
you can link

I am interested in what works to get us collaborating. If Google+ works, fine by me. I like forums and chat and email.

Gary
Re: App Inventor Java Bridge. Imp Inc. 7/12/11 11:59 AM
I've created a new project on google code. I'll be hosting the alternate java bridge library at this location.

Also, the source is here.

I've also set up a new group to discuss Java Bridge. It's labeled for the alternate java bridge library, but really it's for general java bridge discussion over here.

Ryan Bis
www.xiledsystems.com
Re: App Inventor Java Bridge. M. Hossein Amerkashi 7/21/11 8:20 AM
Hello AI Team,

Most of the AI Bridge components are declared as final and one can not extend these classes. This is very inconvenient and forces us to go and mock with the source (which is not advisable because of future releases) to make updates even for smallest changes. Would it be possible to not-to declare them as final so that we could extend those classes for overriding the methods (if needed)?

Thanks,
M. Hossein Amerkashi
Re: App Inventor Java Bridge. Clark Kent 7/21/11 9:04 AM

I guess so, I'll take your advice.

Re: App Inventor Java Bridge. Imp Inc. 7/23/11 5:10 AM
Mark,

 Is the Bridge going to get an update soon, or will it be waiting until the next AI update?

Thanks,

Ryan Bis
www.xiledsystems.com
Re: App Inventor Java Bridge. M. Hossein Amerkashi 7/23/11 8:38 AM
Yes, would be nice to have the new updates (such as WebViewer) into Bridge.
...and hopefully not declaring classes as final.

-Hossein.
Re: App Inventor Java Bridge. Mark Friedman 7/23/11 3:09 PM
We'll update them as soon as we can.

-Mark
Mark Friedman | Google | Manager and Tech Lead, App Inventor for Android | ma...@google.com



Re: App Inventor Java Bridge. Imp Inc. 7/23/11 3:22 PM
No rush. I didn't mean to sound pushy or anything, just curious. Thanks for the update.

Ryan

Re: App Inventor Java Bridge. Imp Inc. 8/4/11 9:49 AM
Mark,

 What does the news about AI mean to the Java Bridge? Is it not going to be kept anymore?

If I'm not overstepping my bounds, I would love to maintain it. That is, if you guys are no longer going to work on it.

I've put a lot of time into AI, Java Bridge, and the alternate library I created. I don't mind spending more on it either.

Ryan Bis
www.xiledsystems.com
Re: App Inventor Java Bridge. Gary Frederick 8/4/11 10:07 AM
It is on my list to say something to the bridge builders. I assume it will be part of the open source. It makes little sense to not include it.

any libraries required by the bridge that are not open source?
Re: App Inventor Java Bridge. Imp Inc. 8/4/11 10:14 AM
The bridge is already open source. (Apache 2.0 license)

 And it uses the Kawa library. I think that is open source, but haven't verified. Either way, it doesn't include the Kawa library as of right now. But, if I were to be so lucky to be able to maintain the bridge, I would add the functionality without the need for the Kawa libraries.
Re: App Inventor Java Bridge. M. Hossein Amerkashi 8/4/11 11:05 AM
Open sources have owners, committers, and contributors who take different responsibility / roles.

I would also love to be part of maintaining the bridge IF AI is not going to be working on it anymore.

I believe kawa is under GNU GPL license.


Hossein.
Re: App Inventor Java Bridge. M. Hossein Amerkashi 8/4/11 1:26 PM
Re: App Inventor Java Bridge. Gary Frederick 8/5/11 2:13 AM
I nominate you as one of the Bridge maintainers.
Now you need to work on the tee shirt and decide when we will have our next hangout

:-)

On Thursday, August 4, 2011 12:14:15 PM UTC-5, Imp Inc. wrote:
The bridge is already open source. (Apache 2.0 license)

 I said:
> I assume it will be part of the open source. It makes little sense to not include it.
It is open source, you can do anything you want with it, including making a branch that does a better job. 
Google is going to open source App Inventor, that could be they throw it over the wall and walk away
or they do a good job packaging and we pick up what they were doing as part of the open source App Inventor project
  which I assume will include the Bridge

Google is looking for ways to help educators going forward. If the Bridge is part of what they give educators, we need to be sure we work smoothly with everything.
 
 And it uses the Kawa library. I think that is open source, but haven't verified.
yep 
Uhhh, it is gnu which is a kind of open source
and came from Per Bothner http://per.bothner.com/software/ wow

Either way, it doesn't include the Kawa library as of right now. But, if I were to be so lucky to be able to maintain the bridge, I would add the functionality without the need for the Kawa libraries.

uhhh
if I were a senior architect with 30 years experience ;-) I would probably say
  hmmm

but I am just a simple man that has a part time job selling parking tickets in an outdoor concert facility (KE$HA was fun, next week it is 311 Fri, Stevie Nicks Sat and Goo Goo Dolls Sunday - pays 10s and 10s of pennies but is very fun) so I will say
  hmmm

I dropped the kawa libraries and used yours as soon as you put them out. The kawa libraries were dragging my install of eclipse to the ground, exactly as you discovered. Good stuff!!!

I look forward to seeing what you are going to do next. And the bridge is open source so we can do anything we want (as long as we comply with the license)

If you maintain the Bridge for the open source App Inventor project, you will have a lot less fun. You will have to maintain it for those silly educators that still use the kawa libraries and those that use the SharedPreferences in TinyDB and make sure the UI components track with the rest of the App Inventor project and 

well, it will be a lot less fun

I would say more but I am getting ready for the show this Friday. It takes a lot of prep to sell someone a parking ticket ;-)

Gary the opinionated 
Re: App Inventor Java Bridge. Gary Frederick 8/5/11 2:18 AM

On Thursday, August 4, 2011 1:05:28 PM UTC-5, M. Hossein Amerkashi wrote:
Open sources have owners, committers, and contributors who take different responsibility / roles.

and open source projects require some folks to keep it all together and focused
 

I would also love to be part of maintaining the bridge IF AI is not going to be working on it anymore.

You get my vote.
and we need to see what Google does for educators.
but I think the bridge will need some maintainers
 

I believe kawa is under GNU GPL license.

yep
how are you with Scheme? I am not very good. :-)
 


Hossein.

Gary the excited about what we can do 
Re: App Inventor Java Bridge. M. Hossein Amerkashi 8/5/11 6:20 AM
Mark, Can you also include other dependent jars such as twitter?
Also, there are some codes that are missing in svn. Can't recall from top of my head, but one was under the error package.

Thanks,
Re: App Inventor Java Bridge. Mark Friedman 8/5/11 3:07 PM
We're working on it.  In time, everything will get released.

-Mark
Mark Friedman | Google | Manager and Tech Lead, App Inventor for Android | ma...@google.com



Re: App Inventor Java Bridge. Dan Ebeling 8/5/11 3:14 PM
Mark your there, woohoo, we missed you!
Re: App Inventor Java Bridge. Mark Friedman 8/5/11 3:15 PM
Everything in the bridge will be part of the open source release.  And as our posting mentioned, we are working hard to find an external organization which will be the long-term owner, maintainer and lead developer of the open source project, including the Java Bridge.  Of course, as an open source project, you will be free to take the code and make your own branch.

-Mark
Mark Friedman | Google | Manager and Tech Lead, App Inventor for Android | ma...@google.com



Re: App Inventor Java Bridge. M. Hossein Amerkashi 8/5/11 3:38 PM
Mark,

If possible, I would love to be part of it.
Re: App Inventor Java Bridge. Behrooz 8/5/11 7:54 PM
Hi,

I am interested to be part of your team.

Thanks,
Behrooz
Re: App Inventor Java Bridge. PavementPilot 9/9/11 7:43 AM
To get started with the Bridge, download the sample project from the App-Inventor-for-Android project at code.google.com.   You can download the project source code with svn (subversion):  Connect to a directory where you typically keep Java projects and issue the command:
svn co http://app-inventor-for-android.googlecode.com/svn/trunk/samples/BridgeToJava
This should create a BridgeToJava folder on your computer, with all the files required to build the app.

 Just what exactly does that mean. Connect with?  Is that in a dos cmd window? A browser? What? 
Re: App Inventor Java Bridge. M. Hossein Amerkashi 9/9/11 8:43 AM
PavementPilot,

Here are some highlights from Mark's original posting to help you:

1.
To use the Bridge, you’ll need to install the Android SDK, set up a development environment and
verify that you can build and run Android projects.  You can do this by going through the
Hello World setup process and tutorial example on the Android Developer site.

2.
create a similar libs directory and put libSimpleAndroidRuntime.jar in there. You should always be able to get the latest version of in http://code.google.com/p/app-inventor-for-android/source/browse/trunk/jars/


3. Get Bridge source code HERE

If you are new to Eclipse, you'll also want to Google for Eclipse YouTube tutorials


M. Hossein Amerkashi
http://Amerkashi.Wordpress.com


Re: App Inventor Java Bridge. PavementPilot 9/10/11 12:44 PM
I am a little fimiliar Eclipse. I have done some of the tutorials. So, where am I supposed to make a new directory to put this jar file into. Where am I supposed to copy and paste the code into? 
This message has been hidden because it was flagged for abuse.
Re: App Inventor Java Bridge. Imp Inc. 9/10/11 11:10 PM
You can check out my HelloPurr tutorial for the bridge here . It walks through the initial setup of a Java Bridge application.

- Ryan
Re: App Inventor Java Bridge. Dominic Venezia 11/23/11 6:59 AM
Hi,

I've been trying to get the bridge working and am having path errors.  I've tried everything (that I know) to resolve these before posting to this group.  The errors are with the import statements, it doesn't like the com.google. beginning of each import.  I couldn't get subversion going from the command line (another path issue) so I created the directory structure myself and saved each file into the proper subdirectory.  I added a 'libs' directory and put the libSimpleAndroidRuntime there, refreshed project and it showed, right clicked it within the package explorer and added it to path.  I just deleted the project and am about to try again, please help.. what am I doing wrong?

Thanks in advance for any help with this.
Re: App Inventor Java Bridge. M. Hossein Amerkashi 11/23/11 7:27 AM
Dominic,

1. Create a folder like this: c:\projects\aibridge\src\com\google\devtools\simple\runtime\components
2. Create a folder like: like c:\projects\ai and use svn to download from trunk (http://app-inventor-for-android.googlecode.com/svn/trunk) into this folder
3. After completion, goto c:\projects\ai\src\components\runtime\components
4. Copy everything from there (3) and paste into components subfolder of 1.

Hope this helps,
M. Hossein Amerkashi
Re: App Inventor Java Bridge. Farooq Shiak 2/14/12 12:22 AM
what is java bridge is it like we can export our AI apps to eclipse and use normal java coding to add more features. if it is so java bridge is some sort of procedure or a software that will take in put as ai apps and do somethign ad produce eclipse loadable project. when i clicked the like i found bunch of files similar to that in eclipse when we create a new project. do we have any tutorial like as we have for AI to start learning abou java bridge can any post some links where i can read more about java bridge
Re: App Inventor Java Bridge. Farooq Shiak 2/14/12 12:23 AM
where and how did u uploaded AI project to eclipse and using java code to add more features if yes could you please tell me how to do that
Re: App Inventor Java Bridge. M. Hossein Amerkashi 2/14/12 4:34 AM
Farooq,

You can not "export" your AI apps into java. Please see Mark's initial posting in this thread on what Java Bridge is.

-Hossein
Re: App Inventor Java Bridge. Sivan Chakravarthy Sundaravadivelu 3/24/12 8:23 AM
Gr8 !! A video tutorial will be nice ... 

Jason :) :D
Re: App Inventor Java Bridge. Robolution 8/12/12 8:15 AM
Hi Hossein,
What is the hurdle in developing an exporter from AppInventor to Eclipse for lower level editing? I find it crucial for beginner/intermediate level programmers like me.
And if it is really a challenge, then how about the reverse operation, i.e. can we export our custom procedures from Eclipse to AppInventor? for example, AppInventor does not support multi finger touch procedures
I really appreciate your comment and advice.
Thanks,
Amin
Re: App Inventor Java Bridge. M. Hossein Amerkashi 8/12/12 8:53 AM
Amin,

From what I know, there is no direct way of doing AI <--> Java export. Having said that, I have seen postings about an effort that Gary is doing [1]. Check that out to see if that helps you out.

What I have done for my own conversion of AI -> Java Bridge, is that in AI, I first see layout of app in AI designer; (e.g. see layout in tutorial [2]. Then based on layout, in the $define() method, I follow exact layout and initialize components:
HorozontalArrangement
   Button
   Button
   Button
Canvas
Button

Next, register events
Following up on same tutorial [2], I then open up Blocks Editor (logic for handling events)
  I capture events and handle the logic:
     if (eventName.equals("Click") ) {
        if (component.equals(btnRed)) {
           myCanvas.PaintColor(Colors.Red);
           return true;
        } else if (component.equals(btnBle)) {
          myCanvas.PaintColor(Colors.Bule));
          return true;
        }
        ....

Again, check out Gary's thread [1] to see if that gives you more info.




--
 
 
 

Re: App Inventor Java Bridge. Geo Massar 8/12/12 9:24 AM
Amin,

You might find more info in those links below.

1) https://sites.google.com/site/mobileprogrammingusf/java-bridge

2) http://code.google.com/p/java-educ-app-inventors/

Geo

--
 
 
 

More topics »