Monday, February 17, 2014

android share pictures


android share pictures

In the following example found online:


public void fxClick (View view) {
Intent intent = new Intent (Intent.ACTION_SEND); / / start sharing attributes
sentFile f = new File (getSDPath () + CACHE + "/" + SystemConfig.rf.getUserName () + date_format.format (new Date ()) + "jpg.");

if (f! = null && f.exists () && f.isFile ()) {
intent.setType ("image / jpg");
Uri u = Uri.fromFile (f);
intent.putExtra (Intent.EXTRA_STREAM, u);
}
intent.putExtra (Intent.EXTRA_SUBJECT, "the two-dimensional code"); / / shared theme
intent.putExtra (Intent.EXTRA_TEXT, "you have to try their luck ha!"); / / share content
intent.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK); / / this might be sharing a list of background it
QrListActivity.this.startActivity (Intent.createChooser (intent, getTitle ())); / / target application selection dialog title
}




Problem: On a high profile phone is no problem in the low-profile mobile phone is always prompt "no application can perform this operation" that


Solving



<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Configuration is how low

Reply:
cited a floor pengguohua1988 reply:
configuration is how low



I do not know, that is 400 * 800 mobile phone,
Reply:
Version of the problem now ..
Reply:
Intent.createChooser () This method, which version you look inside at some
Reply:
I did not want to

No comments:

Post a Comment