Announcements
The Scaleform forum is now read-only. Please head to the Gamedev site for product support.
Scaleform Forum (Read Only)
Scaleform enables developers to leverage the power of the Adobe® Flash® tool set to create powerful user interface environments for video games.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[ANSWERED] Calling Android method

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
438 Views, 7 Replies

[ANSWERED] Calling Android method

I've been trying to get Scaleform to communicate with Android and I'm halfway there (ActionScript to C++ and back), only, I can't get it to work with Android. Here's my code (in FxShippingPlayer.cpp)

if (strcmp(methodName, "scaleformTest"))
{
pmovieView->Invoke("_root.sampleFunction", 0, 0, 0); // do function in Flash, works

// Now try to open the virtual keyboard, just like Scaleform does in the source;
JNIEnv *env;
jclass cls = env->GetObjectClass(JObj);
jmethodID cb = env->GetMethodID(cls, "OpenVirtualKeyboard", "(Z)V");
env->CallVoidMethod(JObj, cb, multiline);

// Not working, error: 'JObj' was not declared in this scope
}
7 REPLIES 7
Message 2 of 8
MatthewDoyleArt
in reply to: Anonymous

Hi Kenney,

I've done some research on this, and have come up with some basic steps on communicating between Flash->C++->Java. I will be creating a new video tutorial very soon to go over the details. Stand by.

Matthew Doyle
Technical Marketing Manager

-----------------------------

Area Blog: Game Dev Blog
Watch me on Youtube: Youtube.com/MatthewDoyleArt
Check out some of my work at: MatthewDoyle.com
Message 3 of 8
Anonymous
in reply to: Anonymous

I love you Matthew, can't wait for the video! Thanks for the support.
Message 4 of 8
Anonymous
in reply to: Anonymous

How's the video coming along? 🙂
Message 5 of 8
PeachTeas
in reply to: Anonymous

Did you put the OnRegisterSWFCallback handler in your SWF file?
Message 6 of 8
Anonymous
in reply to: PeachTeas

I don't think that's the problem here, I'm having trouble communicating between C++ and Java. Not Flash.
Message 7 of 8
MatthewDoyleArt
in reply to: Anonymous

Hi Kenney. I'm sorry it has taken so long. I had a very busy end of 2012. I had to travel to Las Vegas to present a class at Autodesk University, then I had to go on the road to meet with customers. Finally, I've been on vacation for the past few weeks. I'm back now, and should be able to finish that video. I'll let you know as soon as it is up.

Matthew Doyle
Technical Marketing Manager

-----------------------------

Area Blog: Game Dev Blog
Watch me on Youtube: Youtube.com/MatthewDoyleArt
Check out some of my work at: MatthewDoyle.com
Message 8 of 8

Are there any new resources on how best to handle the Flash->C++->Java bridge with Scaleform. We have created tons of plugins for iOS and now are looking to port them to Android. On the iOS side, we make extensive use of the Direct Access API to create custom FunctionHandlers. On the Android side of the things, all we have right now is the ability to create a build using the generated eclipse project, but the C++ code is trapped in the .so generated by arm-linux-androideabi-g++ in the Deployer. I am hoping there is a way to get this .so to build within Eclipse and maybe even to be debuggable!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report