有一个众所周知的问题,即botframework有很高的响应时间。但是,我们使用botframework(C#)在市场上推出了一个机器人,经过一些分析后,我们发现Alarm
(有时是 AlarmManager alarmMgr = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
Intent intent = new Intent(getApplicationContext(), AlarmReceiver.class);
String alertTitle = mTitleText.getText().toString();
intent.putExtra(getString(R.string.alert_title), alertTitle);
// broadcastCode++;
PendingIntent pendingIntent = PendingIntent.getBroadcast(getApplicationContext(), broadcastCode, intent, PendingIntent.FLAG_UPDATE_CURRENT);
alarmMgr.set(AlarmManager.RTC_WAKEUP, calender.getTimeInMillis(), pendingIntent);
cv.put(mDbHelper.TIME, timeString);
cv.put(mDbHelper.DATE, dateString);
public void delete(int id)
{
db.delete( DbHelper.TABLE_NAME, DbHelper.C_ID + "="+id, null);
db.close();
Intent intent = new Intent(getBaseContext(), AlarmReceiver.class);
PendingIntent pendingIntent = PendingIntent.getBroadcast(getBaseContext(), CreateNote.broadcastCode, intent, 0);
AlarmManager alarmManager = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
alarmManager.cancel(pendingIntent);
}
)的请求平均来说很慢(你可以看到)在下图中):
为什么这个时间应该很高?这个问题特定于Telegram吗?