如何在Android中保持屏幕?如何在Android上保持屏幕?
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:" + Uri.encode("+86 212312142")));
startActivityForResult(callIntent, 100);
我希望屏幕保持打开,即使在电话拨号活动。 (无DIM)
我试试这个
PowerManager pm = (PowerManager) act.getSystemService(Context.POWER_SERVICE);
PowerManager.WakeLock wakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK, "XXXX");
wakeLock.acquire();
您是否向清单添加了权限? –