I was trying to use JTwitter for android and started by the following code
B4X:
Dim atl As JavaObject
atl.InitializeArray("winterwell.jtwitter.android.AndroidTwitterLogin" ,Array (Activity,conKey,conSecret,cb))
Here is the Java Example I am following :
B4X:
AndroidTwitterLogin atl = new AndroidTwitterLogin(myApp,
MY_TWITTER_KEY,MY_TWITTER_SECRET,MY_TWITTER_CALLBACK) {
protected void onSuccess(Twitter jtwitter, String[] tokens) {
jtwitter.setStatus("I can now post to Twitter!");
// Recommended: store tokens in your app for future use
// with the constructor OAuthSignpostClient(String consumerKey, String consumerSecret, String accessToken, String accessTokenSecret)
}
};
atl.run();
but unfortunately I got the following error
B4X:
java.lang.IllegalArgumentException: Array has incompatible type: class [Lwinterwell.jtwitter.android.AndroidTwitterLogin;
I think I must set type of each argument but I could not get that working.
I need your help .
Why are you using InitializeArray? You will need to use InitializeNewInstance to get the AndroidTwitterLogin object. But you will still need to use the Reflector to get the activity.
An array would have to contain all objects of the same class.
Why are you using InitializeArray? You will need to use InitializeNewInstance to get the AndroidTwitterLogin object. But you will still need to use the Reflector to get the activity.
An array would have to contain all objects of the same class.