使用ACTION_SEND可以将消息发布到各种共享服务,如gmail、facebook、twitter等。大多数服务的消息长度都相当长,但twitter尤其短(140个字符)。
当Intent.createChooser()对话框出现时,用户事先不知道要选择哪个服务,有没有办法构建一个意向,从而为twitter生成短消息,但为其他服务生成长消息?
使用ACTION_SEND可以将消息发布到各种共享服务,如gmail、facebook、twitter等。大多数服务的消息长度都相当长,但twitter尤其短(140个字符)。
当Intent.createChooser()对话框出现时,用户事先不知道要选择哪个服务,有没有办法构建一个意向,从而为twitter生成短消息,但为其他服务生成长消息?
也许你可以尝试在你的应用程序中使用twitter分离共享作为一个选项。在某些编辑文本框中从应用程序内部获取文本,验证并检查其是否少于140个字符,然后发送文本。即使在这种情况下,当您调用ACTION_SEND
时,用户也可以看到所有选项,但这些选项至少限制为140个字符。
Intent i=new Intent(android.content.Intent.ACTION_SEND);
i.setType("text/plain");
i.putExtra(Intent.EXTRA_SUBJECT, R.string.share_subject);
i.putExtra(Intent.EXTRA_TEXT, ...);
startActivity(Intent.createChooser(i, R.string.share_title));
你也可以尝试使用Bitly API来缩短发布在twitter上的URL
I am trying to write an extension for Google Chrome. I want to capture any keyboard input on a given page, and do something magic to it. I am able to do most of what I need with these lines: ...
if you are inactive on gmail, by not moving your mouse for a while, it changes your chat status to orange which means idle. but when you start moving the mouse again it turns it back to green meaning ...
how do i read mails from my mail box using python?? import getpass, imaplib M = imaplib.IMAP4( IMAP4.gmail.com:993 ) M.login(getpass.getuser(), getpass.getpass()) M.select() typ, data = M.search(None,...
I am trying to create a web application which upon entering your email address and message , sends an email with this information from the email address. I used this: try { ...
Does anybody know of a bookmarklet or firefox addon that let s you extract part of an url. Specifically I want to extract the message id from a gmail conversation. Every message in gmail has a unique ...
Gmail has this sweet thing going on to get an atom feed: def gmail_url(user, pwd): return "https://"+str(user)+":"+str(pwd)+"@gmail.google.com/gmail/feed/atom" Now when you do this in a browser, ...
Is there a way I can create an addin for my Gmail account? Is GreaseMonkey the only real way? I use Gmail for customer service, and I d like to create a tool that looks up the customer and preps a ...
string from = "abc@gmail.com"; string to = "xyz@gmail.com,xyz@yahoo.co.in"; string password="abcxyz"; MailMessage mail = new System.Net.Mail.MailMessage(); mail.To.Add(to); mail.From = new ...