0

I'm having some trouble finding documentation of how to communicate an android app with AMF.

This post is related to this post How to connect app Android with amf web services?. I've seen the Adobe post but is helpless in my case.

I was using flex-messaging-common and flex-messaging-core in my swing application and want to do the same in android, but the classes are different (eg: AMFConnection doesn't exists) and couldn't find anywhere how to do the same.

Is there any tutorial, documentation or something else than the link in Adobe ?.

Community
  • 1
  • 1
marbarfa
  • 677
  • 1
  • 7
  • 16
  • It's no different than using AMF in an AIR project or a Web project. In many cases, you'll just compile the services-config into your app using the services compiler argument. Without knowing what you're doing; I'm not understanding what classes are different. RemoteObject works fine in a Flex mobile project. – JeffryHouser Jun 28 '12 at 15:20
  • Question has nothing to do with Flex... – micapam Jul 01 '12 at 08:09

1 Answers1

3

In case someone else has the same problem, I finally ended up using Klio library and everything worked just fine.

marbarfa
  • 677
  • 1
  • 7
  • 16
  • How can you add new objects to be encoded and decoded and the farthest i can get using it is an error while calling remote method, its a ClientStatusException message: java.io.EOFException code:AMFConnection.Call.Failed – zurbergram Apr 09 '13 at 20:19
  • Sorry for the delay. You could use the same DataType in both sides (eg: create a project that contains these classes and use it in both projects), or you could parse the response. The response will be sent as an ASObject or a collection of ASObjects. An ASObject is basically a HashMap with key = fieldName and value = fieldValue. – marbarfa May 16 '13 at 11:16
  • Could You please provide more information how to cast object received from amf channel to target object? When I cast it like this: `User wrapper = (User) result;` I get: **java.lang.ClassCastException: flex.messaging.io.amf.ASObject** When I try `ActionScriptDecoder dec = DecoderFactory.getDecoder(result, User.class); Object o = dec.decodeObject(result, User.class);` or `ASTranslator translator = new ASTranslator(); User user = (User) translator.convert(result, User.class);` I get **flex.messaging.MessageException: TYPE_NOT_FOUND. TYPE_NOT_FOUND** – Patryk Ziemkowski Mar 05 '14 at 09:28