来自服务的Android启动对话框

时间:2013-10-25 13:52:44

标签: android service dialog

我正在尝试从Android中的服务打开一个对话框:

MeasurementsStarter.measurementsstarter.createConsciousnessDialog();

createConsciousnessDialog:

public void createConsciousnessDialog() {
    consciousnessDialog = new AlertDialog.Builder(this)
            .setTitle("Bent u bij bewustzijn?")
            .setMessage(
                    "U heeft al 30 seconden niet bewogen, bent u nog bij bewustzijn")
            .setPositiveButton("Ja", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    MeasuringService.measuringservice.resetSensorBooleans();
                }
            }).show();
}

但是我应该打开它。它被调用,但除此之外没有任何事情发生(LogCat):

Failure getting entry for 0x010802c9 (t=7 e=713) in package 0 (error -75)
Attempting to initialize hardware acceleration outside of the main thread, aborting

我希望有人可以帮助我,谢谢

0 个答案:

没有答案