Open vshivam opened 8 years ago
Based on some basic testing, passing data.body.privlyUrl
to the receiveNewPrivlyURL()
method works. I'm not sure how it effects everything else.
I am confused how this could be broken on Android and not on the other platforms. Is there a problem with the newer context messenger?
The context messenger doesn't actually send 'undefined'. It sends the whole data object to the JS bridge. The interface however, only understands primitive types and strings which results in an 'undefined'.
As to what it does with the client does with the original Url and how it uses it, check this[0] out.
So privly-applications needs to serialize the object and we add a JSON deserialization library to the Android side?
Works for me. The other option would be to retrieve the Url from the data object and pass it on to the receiveNewPrivlyURL
method.
When creating a new PlainPost or Message, the
receiveNewPrivlyURL()
[0] method receives 'undefined' instead of a Privly Url on the client side.Not sure if this is relevant but the applications on being loaded in the WebView also throw this exception :
setListener is called but is not implemented (current adapter: %s) -- From line 215 of file:///android_asset/PrivlyApplications/shared/javascripts/context_messenger.js
[0] https://github.com/privly/privly-applications/blob/master/shared/javascripts/context_messenger.js#L686