Generic Parameter doesn't validate (reposted : wrong category)

Hello fellow programmers,

I am studying the example app on http://developer.android.com/resources/samples/BluetoothChat/index.html .
I have an application that needs bluetooth support, so I’m converting (part of the) code to Oxygene. I came across a line that doesn’t make sense to me:

// Get the BluetoothDevice object from the Intent

var Device : BluetoothDevice := intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);

Gives an error :

Error 14 (E210) Generic parameter doesn’t validate on “android.os.Parcelable” constraint for “T”
Error 13 (E209) Generic parameter “T” for this method call could not fully be resolved

What am I missing?

Thanks in advance!

Greetz,
Oznov

getParcelableExtra needs a generic parameter. Try something like:


var Device  := intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);