Java binding how to access delegate method that was available in java

NaphierNaphier USMember ✭✭
edited August 2015 in Xamarin.Android

I'm working on a binding project for an SDK we'd like to use. We've used it before like this in java:

import com.adplatform.android.adplatformsdk.AdManagerDelegate;
import com.adplatform.android.adplatformsdk.AdManager;

class MainActivity extends Activity implements AdManagerDelegate{

public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);


    AdManager adManager = new AdManager(this);
    adManager.setDelegate(this);
    adManager.uploadAppList();
    Log.i("AdManager" , "initialized");
}

//delegate
@Override
public void appListUploadComplete(int statusCode, String message) {
    Log.i("AdManager" , "App List Upload Complete, Status: " + String.valueOf(statusCode) + " message: "+message);      
}

//delegate
@Override
public void promoGetComplete(int statusCode, String message, List<String> suggestedPromoApps) {
    //method not called with basic implementation
}
}

In java we were able to use adManager.setDelegate(this) which has completely disappeared.
In the binding there is now public partial interface IAdManagerDelegate : IJavaObject which contains methods for void AppListUploadComplete (int p0, string p1); and void PromoGetComplete (int p0, string p1, global::System.Collections.Generic.IList<string> p2);
But I can't figure out how to override them like you would in Java.
I've uploaded the Xamarin-generarted binding here:
http://pastebin.com/UC19Mxn1

Any insight would be helpful! Thanks!

Answers

  • NaphierNaphier USMember ✭✭

    Creating a class that inherits from IAdManagerDelegate isn't allowing me to override either.

Sign In or Register to comment.