Android 如何在我的listView中获取gmail邮件
这是我的代码,在store.connect(..)之后无法移动。即使在调试模式下。请确保您在应用程序清单中定义了internet权限。我正在使用上述权限。我的代码工作正常,我正在邮件数组中存储邮件,我正在使用getSubject、getFrom获取发件人和主题,但如何获取邮件正文。。。。?Android 如何在我的listView中获取gmail邮件,android,android-asynctask,gmail,email-client,Android,Android Asynctask,Gmail,Email Client,这是我的代码,在store.connect(..)之后无法移动。即使在调试模式下。请确保您在应用程序清单中定义了internet权限。我正在使用上述权限。我的代码工作正常,我正在邮件数组中存储邮件,我正在使用getSubject、getFrom获取发件人和主题,但如何获取邮件正文。。。。? protected Void doInBackground(String[]... urls) { String userPass[]=urls[0]; St
protected Void doInBackground(String[]... urls) {
String userPass[]=urls[0];
String user=userPass[0];
String password=userPass[1];
try {
Properties props = System.getProperties();
props.setProperty("mail.store.protocol", "imaps");
session = Session.getDefaultInstance(props, null);
store = session.getStore("imaps");
store.connect(mailhost, user, password);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}