Randonee / BasisAndroid

Native Android application development with haxe
34 stars 7 forks source link

Using FlashDevelop and NME to build? #3

Open hopewise opened 11 years ago

hopewise commented 11 years ago

Hello,

When I build NME app targetting android with FlashDevelop, it will build it like this: haxelib run nme build (my app path)\application.nmml android

Using Basis, in the command line, I type: haxelib run Basis build.xml android

So, how would I use FlashDevelop to build my project? shall I just use custom build? how would the build.xml be then?

What I saw in the example of android is that there is a layout folder with main.xml to present the main activity .. but, how can I build my views with code? How would I use nme packages? to create MovieClips and sprites? Shapes .. etc?

Thanks very much for your help.

Randonee commented 11 years ago

I don't use flash develop so I'm unsure of what is needed. Custom build sounds like the way to go though. There is some documentation for the build xml format in the readme here: https://github.com/Randonee/Basis

NME is not used so that display list is not available. Externs are used to access the android api. http://developer.android.com/reference/packages.html The goal is to make accessing the UI components in haxe similar to developing in java using the android API.

hopewise commented 11 years ago

It would be great if we can compile NME project to a library, then, communicate with this library from native android app, I don't know if this can be achieved using Basis?

Randonee commented 11 years ago

There may be some way to make an NME view for android and other platforms. I haven't looked so It may even be how NME handles things now.

hopewise commented 11 years ago

Oh, I wish I can master that, or at least find some article about it, image having all NME power encapulated in a library that can easily be viewed in a layout .. there must be a way ..

On Wed, Feb 20, 2013 at 4:06 PM, Aaron notifications@github.com wrote:

There may be some way to make an NME view for android and other platforms. I haven't looked so It may even be how NME handles things now.

— Reply to this email directly or view it on GitHubhttps://github.com/Randonee/BasisAndroid/issues/3#issuecomment-13833101.

Kind Regards,

Samir Sabri Software Architect& Developer www.dcaclab.com Jordan-Middle East

Randonee commented 11 years ago

Specific documentation probably doesn't exist. This may be a good place to start: https://github.com/haxenme/NME/blob/master/templates/default/android/template/src/org/haxe/nme/GameActivity.java

This is the NME main activity code.