Reputation: 1
I was working on my android project and suddenly this error came into my program what could be the reason and how can i clear it... here is my code:
public class sharing extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sharing);
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
sendIntent.setType("text/plain");
startActivity(Intent.createChooser(sendIntent, getResources().getText(R.string.send_to)));
}
Upvotes: 0
Views: 87
Reputation: 1522
Try to add this to your string.xml:
<string name="send_to">Sending to</string>
Upvotes: 1