-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameter type problem in NativeScript #46
Comments
@jibon57 Would you like to open a PR to address this? |
@crookedneighbor Thanks but I ain't that type of expert :( . I need your help :)
may be like this
I ain't sure :( :( |
Hey @jibon57, I'm looking at the final answer to the question you posted suggesting you do something like the following: let isAndroidPayEnabled = dropInRequest.getClass().getMethod("isAndroidPayEnabled", []);
let booleanType = isAndroidPayEnabled.getReturnType();
let collectDeviceDataMethod = dropInRequest.getClass().getMethod("collectDeviceData", [booleanType]);
collectDeviceDataMethod.invoke(dropInRequest, [true]); While I can't exactly endorse this code snippet, did it work for you in this case? Nativescript bindings are not something we're actively supporting, so any issues encountered using this library in a Nativescript environment should likely be directed at the To be specific, we can't justify changing the type of |
@sdcoffey Thanks for reply. Yes, the trick is working fine but the guy who solved the problem already mentioned that the trick is dirty. But works for me :). I have started a new project here: https://github.com/jibon57/nativescript-braintree Still now everything looks good :) |
It is indeed a dirty trick, but if it's working for you, that's the best we can do from this end unforch. Good luck! |
Hello,
I am trying to implement this library for NativeScript but it can't extracted metadata for
Boolean
parameter type. http://static.javadoc.io/com.braintreepayments.api/drop-in/3.1.0/com/braintreepayments/api/dropin/DropInRequest.html#collectDeviceData-boolean-We tried to implement it using Java reflection like here: NativeScript/android#831 (comment)
but not working for this method
collectDeviceData(boolean collectDeviceData)
:Error:
It can't understand
boolean
type. It would be better if it is "java.lang.Boolean.class
"Anyone have suggestion? Thanks in advance.
The text was updated successfully, but these errors were encountered: