我正在使用链接中的代码示例(SendEmailCtrl.java):.ready()
我的活动通过示例发送电子邮件,我添加了库@Override
public void onDestroy(){
stopMediaPlayer(); //Line 114
}
public void stopMediaPlayer() {
notificationManager.cancelAll();//Line 225
mMediaPlayer.release();
}
我没有找到更多如何使用gmail api
发送邮件的示例public void showNotification(){
builder = new NotificationCompat.Builder(this);
builder.setTicker("Hello");
builder.setContentTitle("Helloo");
builder.setContentText("Helloooo");
builder.setOngoing(true);
notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
// Will display the notification in the notification bar
notificationManager.notify(NOTIFICATION_ID, builder.build());
}
当我运行应用程序时,我收到此错误:
if(Hello.CONFIG_APP.getBoolean("show_notification", true)) showNotificacion();