Dart on Android soon?

Showing 1-21 of 21 messages
Dart on Android soon? Nelson Silva 5/8/13 3:42 AM
Hi all,

I've been following the ARM support stuff that has been added to Dart recently so I was wondering if we'll be getting Dart on Android any time soon ?

I've tried to make a couple of changes to build.py to get the cross platform build to target the arm arch using the prebuilt NDK packages but failed to get it working... any tips ?
Re: Dart on Android soon? Gen 5/8/13 4:09 AM
I do not know what you mean by Dart on Android.

But I would like to have something like phonegap as Dart library and a comfortable Android emulation in Dart and the Dart Editor.
 
My guess is that the Dart team prefers to support the HTML standard for the newest Chrome browser with Android specific extensions.
Instead of supporting native technologies in multiple versions using the native API (Java, Objective C).
Re: Dart on Android soon? kc 5/8/13 8:19 AM
On Wednesday, May 8, 2013 12:09:29 PM UTC+1, Gen wrote:
I do not know what you mean by Dart on Android.

But I would like to have something like phonegap as Dart library and a comfortable Android emulation in Dart and the Dart Editor.
 

I would like to create Android apks which include the DartVM and have access to the non-ui parts of the android platform re services, activities. And write cross platform 2d/3d code.
With HTML widgets that use the android platform theme.

K.
Re: Dart on Android soon? James Wendel 5/8/13 8:29 AM
I'm guessing that the DartVM Arm work is to get Dart working in Chrome on Android, not for Dart as a stand-alone application on android.  They have already stated that the browser is their goal, so I'm guessing Android native dart would just be an experiment by a few people on the team and nothing official.
Re: Dart on Android soon? Peter Jakobs 5/8/13 8:38 AM
Well that is not exactly the case, they already run the dartvm with opengl es bindings on android fpr x86
Re: Dart on Android soon? Nelson Silva 5/8/13 8:45 AM
DartVM can be embedded and by creating native extensions you can expose the Android API to Dart (although you'll have to use the Android NDK which in turns uses JNI to call java stuff).
Re: [dart-misc] Re: Dart on Android soon? Ladislav Thon 5/8/13 10:01 AM

Well that is not exactly the case, they already run the dartvm with opengl es bindings on android fpr x86

And it's exactly what James wrote -- an experiment by a few people on the team. Well, few... I think it's one :-)

LT
Re: [dart-misc] Re: Dart on Android soon? Graham Wheeler 5/8/13 10:04 AM
James is correct; even the current x86 OpenGL Android sample is only that - a sample that a couple of people on the team worked on. We will most likely spin this out into a community project on GitHub so that others can pick it up. That said, yes, we would like to see it working on Arm once Arm support in the VM is complete.



--
Consider asking HOWTO questions at Stack Overflow: http://stackoverflow.com/tags/dart
 
 

Re: [dart-misc] Re: Dart on Android soon? Nelson Silva 5/8/13 10:24 AM
Never expected Dart VM's OpenGL, Android, etc, bindings to be officially supported and I'm all for moving these to community projects as suggested in my openglui related post (https://groups.google.com/a/dartlang.org/forum/?fromgroups=#!topic/misc/KdslI0AaliU)

Still Dart VM will officially support the arm arch on Android so I was just wondering how close we are to being able to build Dart with the Android arm toolchain ? 
Re: [dart-misc] Re: Dart on Android soon? kc 5/8/13 11:00 AM
On Wednesday, May 8, 2013 6:24:45 PM UTC+1, Nelson Silva wrote:
Never expected Dart VM's OpenGL, Android, etc, bindings to be officially supported and I'm all for moving these to community projects as suggested in my openglui related post (https://groups.google.com/a/dartlang.org/forum/?fromgroups=#!topic/misc/KdslI0AaliU)


I think they should be officially supported - especially webgl/canvas. Because developers will be able to have a shared code base between a 'native' apk Android app and Chrome (desktop and mobile) apps.

Unless Google's plan is to deliberately not cross the streams for Android and Chrome. That is code in JS for a Chrome 'app' - and then code again in Java/Dalvik for Android.
Whereas MS are - code in JS/TypeScript for the web and also for Metro/Win8 via WinJS - which they may get right with Blue.

K.
Re: [dart-misc] Re: Dart on Android soon? Nelson Silva 5/8/13 11:09 AM
Well, i believe Google will soon make Chrome packaged apps available on Android and make these "first class citizens"... i just hope that by then Dart is part of Chrome...

Google already provides WebGL, Canvas, etc.. as part of Chrome/Blink so rewriting is probably not high on their priorities... perhaps Blink will enable us to just use some bits and pieces... perhaps we could reuse these along with the existing dart:webgl bindings in and embedded Dart VM. 
Re: [dart-misc] Re: Dart on Android soon? kc 5/8/13 11:25 AM
On Wednesday, May 8, 2013 7:09:52 PM UTC+1, Nelson Silva wrote:
Well, i believe Google will soon make Chrome packaged apps available on Android and make these "first class citizens"... i just hope that by then Dart is part of Chrome...


That would be a way forward. And Dart could be the way Google unifies it's platforms - not all at once - first core libs and 2D/3D graphics. Maybe Google IO will yield some answers.

But currently: 

From the Chrome packaged apps FAQ:
Will apps work on Android?
If your app is pure HTML, CSS3, and JavaScript and is hosted on your servers there is a good chance that it will work in the browser on Android. However, .crx files (including packaged apps) are not supported on Android. Users cannot install their apps onto the Android browser, but they can most likely use those apps by directly accessing the app's URL.

K.



Re: Dart on Android soon? solarwirelessmile 5/8/13 11:59 AM
I was able to cross-compile Dart for ARM (on Linux) with yesterday's sources and get some simple "Hello, Dart!" programs running on the BeagleBone Black under Angstrom.  I followed the online directions for "How to build and test the Dart project" with a setting of --arch=arm. (If you add --mode=release you'll get builds corresponding out/ReleaseARM/dart). I specified the ARM toolchain during my setup, following the directions at "How to set up your machine to build Dart".

Cross-compiling the build failed late in the process, when it was compiling some of the documentation, but I was past the step where it successfully built the Dart executable: LINK(target) out/DebugARM/dart

I was able to take that binary, copy it onto the BeagleBone Black and successfully run some simple Dart programs on ARM.

The BeagleBone Black also supports Android - so that could be a potential future test platform.
Re: [dart-misc] Dart on Android soon? Nelson Silva 5/8/13 1:13 PM
I tried it today but if you add the --os=android flag most of the stuff is hard coded for ia32 and the linux_x86 compiler.. I'm on Linux 64 bit which probably doesn't help either... I'll try to play some more with it tomorrow.
--
Consider asking HOWTO questions at Stack Overflow: http://stackoverflow.com/tags/dart
 
 
Re: [dart-misc] Dart on Android soon? Nelson Silva 5/9/13 10:23 AM
Hi all,

After struggling with several hardcoded ia32/x86 settings and with skia i finally managed to build dart on Android " tools/build.py -m release -a arm --os=android samples"

Unfortunately I can't get any of the samples running on my device :

ActivityManager(  357): Start proc com.google.dartndk for activity com.google.dartndk/.DummyActivity: pid=27517 uid=10090 gids={50090, 1028}
DartExt (27517): Creating isolate /data/data/com.google.dartndk/app_dart/main.dart, main
DartExt (27517): OpenFile
DartExt (27517): Couldn't create isolate: Unable to find dart source for dart:core
DartExt (27517): CreateIsolateAndSetup: Unable to find dart source for dart:core

I've seen a couple of commits about loading the core libraries from sources and was wondering if the embedded samples have been update to reflect this ?

In the meantime i've copied a couple of methods from bin/dart_utils.c to pass to Dart_Initialize which seem to be needed for reading these core libraries....
Re: [dart-misc] Dart on Android soon? Sorin Irimies 7/14/13 5:10 AM

HI Nelson,

I am trying to build dart for android. Would it be possible to write a short how to on how you did it.
It would be greatly appreciated.
unk...@googlegroups.com 7/15/13 1:53 AM <This message has been deleted.>
Re: [dart-misc] Dart on Android soon? Nelson Silva 7/16/13 2:25 AM
Hi,

I've posted my reply here yesterday but today it shows that "This message has been deleted" so let me try again:

I just did a clean checkout and build for ARM a couple of weeks ago so i took some quick notes of the changes and build process:
 
 
 # Get the source
 gclient config
http://dart.googlecode.com/svn/branches/bleeding_edge/deps/all.deps
 echo
"target_os = ['android']" >> .gclient
 gclient sync
 
 
# Make some changes:
 
# tools/build.py
 
104: if not arch in ['ia32', 'arm']:
 
107: if target_arch not in ['ia32', 'arm']:
 
161: toolchain_arch = 'arm-linux-androideabi-4.4.3'
 
188: target_arch=arm
 
421: toolchainprefix = ('%s/arm-linux-androideabi' % os.environ['ANDROID_TOOLCHAIN'])
 
 
# tools/gyp/all.gypi
 
12: 'target_arch': 'arm'
 
+13: 'armv7': 0
 
 
# tools/gyp/configurations_android.gypi
 
21: 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-14/arch-<(android_target_arch)',
 
36: 'android_target_arch' : 'arm',
 
 
# runtime/vm/assembler_arm.cc
 
14: //#if !defined(USING_SIMULATOR) && !defined(__linux__)
 
15: //#error ARM cross-compile only supported on Linux
 
16: //#endif
 
 
# Build
 tools
/build.py -m release -a arm --os=android -v dart
 
 
# Push dart to android
 adb push
out/android/ReleaseARM/dart /data/local/tmp/dart
 
 
# Push some benchmarks and/or examples
 adb push hello
.dart /data/local/tmp/dart
 
 
# Run it
 adb shell
/data/local/tmp/dart /data/local/tmp/hello.dart


Hope this helps.
Re: [dart-misc] Dart on Android soon? Sorin Irimies 7/23/13 10:15 AM
HI Nelson,
Thx for the thorough information. I forgot to tell you that I am trying to build it on an Ubuntu 13.04 32 bit machine. Would that work?


--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new
 
 

Re: [dart-misc] Dart on Android soon? Sorin Irimies 7/23/13 4:00 PM
Hi,
I looked up closer and there was one more place where I needed to rename into arm in the build.py.
It started compiling but I got to a point in which I received this message:

arm-linux-androideabi-g++: muldefs: No such file or directory
make: *** [out/android/ReleaseARM/dart] Error 1
BUILD FAILED

Could it be due to symbolic linkage?
Did you also encountered this problem?
Re: [dart-misc] Dart on Android soon? Sébastien Deleuze 6/5/14 11:59 PM
Please vote (star) this issue if you are interested about building native Android applications with Dart : https://code.google.com/p/dart/issues/detail?id=19266
More topics »