Suresh is right, convert your hash to a list of JSON keyvalue pairs, then pass it to Android be read into a hash object. Be sure to pass it on the left hand side.
Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 22, 2:26 pm, suresh <[email protected]> wrote: > There are very few types that get auto-marshaled across the JavaScript- > Java boundary. Strings and integers can be passed from JavaScript to > Java. I suggest passing complex objects as JSON strings and using the > JSON classes to marshal/un-marshal. > > On Jun 29, 5:52 am, eartied1 <[email protected]> wrote: > > > > > Hello, > > I'm trying to pass a map from javascript to a java function which has > > to get that map information and process it: > > > JavaScript: > > > function beforeSMS() > > { > > sms.createSMS({body:"hello"}); > > > } > > > Java: > > I have added a new interface to webView: > > > mWebView.addJavascriptInterface(new SMSManager(this, mWebView), > > "sms"); > > > And the method where I need to get the info is like this, but message > > is always null: > > > public void createSMS(Hashtable<SMSMessage, String> message) > > { > > SMSMessage result = null; > > Enumeration<String>test= message.elements(); > > } > > > Do you know if webView supports hashtable or maps? > > What I'm doing wrong? > > Any clue? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

