import statement to create a session object in android
In开发者_如何学Python android, I want to create a session object.
I saw a statment in one of the post as follow; public static Session mySessionObject = new Session(); where can i get the import statment?I simple want to have a client base login that manages session.
Thank you,
Session session = new Session();
Properties props = new Properties();
session = Session.getDefaultInstance(props, this);
then you can add
MimeMessage message = new MimeMessage(session);
The android framework doesn't have any Session class. Ask the author of that code, what he used there. If you don't have special needs, you can write your own Session class.
精彩评论