List of usage examples for org.apache.http.protocol HTTP PLAIN_TEXT_TYPE
String PLAIN_TEXT_TYPE
To view the source code for org.apache.http.protocol HTTP PLAIN_TEXT_TYPE.
Click Source Link
From source file:pffy.mobile.flax.FlaxActivity.java
private boolean sendDetailsByIntent() { if (this.mExportFacts.equals("") || this.mExportFacts == null) { // do not send empty files return false; }/* w w w .j a va2 s. c o m*/ // boilerplate intent code Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT, this.mExportFacts); sendIntent.setType(HTTP.PLAIN_TEXT_TYPE); startActivity(Intent.createChooser(sendIntent, getResources().getString(R.string.msg_shareto))); return true; }
From source file:com.olacabs.customer.ui.TrackRideActivity.java
public void onClick(View view) { Intent intent;//w w w. ja v a 2s. c o m switch (view.getId()) { case R.id.backImageView: onBackPressed(); case R.id.cancelRideText: if (Utils.m14909a(getApplicationContext())) { m13979b(); if (this.f10204k != null) { m13937d(this.f10204k.getCategory_id()); this.f10219z.setEnabled(false); m13980b(this.f10204k.getCategory_id()); return; } return; } m13977a(); m13919a(Constants.CONNECTION_TIME_OUT_HEADER, Constants.NO_NETWORK_TEXT); case R.id.callText: Localytics.tagEvent("Driver Called"); if (this.f10204k != null) { startActivity(new Intent("android.intent.action.CALL", Uri.parse("tel:" + this.f10204k.getDriverMobile()))); } case R.id.shareText: String str = Trace.NULL; if (this.f10203j != null) { str = this.f10203j.getShareRideText(); } m13947h(); try { if (VERSION.SDK_INT >= 19) { String defaultSmsPackage = Sms.getDefaultSmsPackage(this); Intent intent2 = new Intent("android.intent.action.SEND"); intent2.setType(HTTP.PLAIN_TEXT_TYPE); intent2.putExtra("android.intent.extra.TEXT", str); if (defaultSmsPackage != null) { intent2.setPackage(defaultSmsPackage); } startActivity(intent2); return; } intent = new Intent("android.intent.action.VIEW"); intent.setData(Uri.parse("sms:")); intent.putExtra("sms_body", str); startActivity(intent); } catch (ActivityNotFoundException e) { OLog.m13313b("SMS app not found", new Object[0]); } case R.id.currentPositionImage: if (this.f10202i.m13399e() && this.f10204k != null) { this.f10202i.m13394a(new LatLng(this.f10204k.getLat(), this.f10204k.getLng()), true, 17); } case R.id.cusomMessageLayout: if ((!this.f10189R && !this.f10190S) || this.f10184M) { m13945g(); f10169b = true; m13956m(); } case R.id.rateStar: if (this.f10205l == 2 || this.f10205l == 3) { this.f10173B.setBackgroundColor(getResources().getColor(R.color.ola_black_semi_transparency)); this.f10215v.findViewById(R.id.no_location_pointer).setVisibility(8); this.f10215v.findViewById(R.id.no_location_alert).setVisibility(8); this.f10215v.findViewById(R.id.rating_star_inactive).setVisibility(0); ((TextView) this.f10215v.findViewById(R.id.no_location_text)) .setText(R.string.track_ride_overlay_message); ((TextView) this.f10215v.findViewById(R.id.no_location_message)) .setText(R.string.track_ride_overlay_tap_message); this.f10215v.findViewById(R.id.rating_star_pointer).setVisibility(0); this.f10215v.setVisibility(0); m13932c("Before start trip"); return; } intent = new Intent(this, RateRideActivity.class); intent.putExtra(Constants.DRIVER_IMAGE_URL, Sherlock.m13349d(this.f10204k != null ? this.f10204k.getDriverImageUrl() : Trace.NULL)); intent.putExtra(Constants.ARG_BOOKING_ID, Sherlock.m13349d(this.f10203j.getBookingId())); if ("local_taxi".equalsIgnoreCase(this.f10204k.getCategory_id()) || "local_auto".equalsIgnoreCase(this.f10204k.getCategory_id())) { intent.putExtra(Constants.ARG_CAR_CATEGORY_ID, "auto"); } else { intent.putExtra(Constants.ARG_CAR_CATEGORY_ID, "cab"); } startActivity(intent); overridePendingTransition(R.anim.slideup, R.anim.noanimation); m13932c("After start trip"); case R.id.sos_image: m13961o(); case R.id.view_no_location_overlay: this.f10215v.setVisibility(8); this.f10173B.setBackgroundColor(getResources().getColor(R.color.transparent)); default: } }