Director 1.2 demo does not run at all on Android

Has anybody tried to install the Director 1.2 demo app on an Android device? I tried it on my DroidX and I just get a blank screen. Nothing at all. Am I alone in trying this on real devices? [import]uid: 12529 topic_id: 6805 reply_id: 306805[/import]

ricardorauber: Do you have any guidance for us on this? Do you have any way to test your demo app on a real Android device?

Bumping this because if the demo app doesn’t work on Android, that’s going to be a problem for anybody trying to use Director in their app. [import]uid: 12529 topic_id: 6805 reply_id: 24525[/import]

Turns out that this is nothing new. I just tried the Director 1.1 demo app and it doesn’t work either. Just shows a black screen on a DroidX.

So it’s not specific to v1.2. I’ll continue to investigate why it doesn’t work. [import]uid: 12529 topic_id: 6805 reply_id: 24539[/import]

**FIXED**

It’s obvious that the demo was never tested on Android. In the Director demo, you are trying load images from the “images” subdirectory, using syntax like this:

[lua]local background = display.newImage(“images/background2.png”)[/lua]

That does not work on Android. It causes a crash, which forces the routine calling display.newImage to exit without running the rest of the code in the function.

You also should not do this on iOS. On iOS, images are placed into the Resource Directory. You shouldn’t be trying to create subdirectories.

I recommend reading the page: http://developer.anscamobile.com/content/system-os and scrolling down to the section on the system Resource Directory.

So, to fix the Director demo app, you need to put your images in the main application directory, and then access them like this:
[lua]local background = display.newImage(“background2.png”)[/lua]

It might be possible to use the second argument of display.newImage to specify a Base file path, but again, with the differences between iOS and Android, I’m not sure exactly how to set this so it will work.

The easy solution is to just keep resources in the same directory as main.lua just like the Corona documentation recommends. Once I made the image changes to the Director demo, then it ran correctly on the DroidX. So I’m still investigating why my own app crashes on DroidX while the Director demo works. [import]uid: 12529 topic_id: 6805 reply_id: 24561[/import]