var main = plus.android.runtimeMainActivity();
var Uri = plus.android.importClass("android.net.Uri");
var ContactsContract = plus.android.importClass('android.provider.ContactsContract');
var uri = Uri.parse("content://com.android.contacts/contacts");
var cr = main.getContentResolver();
plus.android.importClass(cr);
var ContentObserver = plus.android.importClass('android.database.ContentObserver');
var handle=function(){
console.log("test")
}
var nowobv = new ContentObserver(handle)
cr.registerContentObserver(uri, false, nowobv)
我做了这样的一个数据库对接的接口,但是到这一步就报错
Uncaught Can't instantiate abstract class android.database.ContentObserver;at new android.database.ContentObserver at index.html:1
0 个回复