Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It might be android Sdk problem, please Try this one</p> <pre><code> int SDK_INT = android.os.Build.VERSION.SDK_INT; DateFormat formatter = new SimpleDateFormat("MMMM dd, yyyy, h:mmaa"); long lnsTime = 0, lneTime = 0; Date dateObject; try { String dob_var = "May 05, 2012, 07:10PM"; dateObject = formatter.parse(dob_var); lnsTime = dateObject.getTime(); Log.e(null, Long.toString(lnsTime)); dob_var = "May 06, 2012, 02:10PM"; dateObject = formatter.parse(dob_var); lneTime = dateObject.getTime(); Log.e(null, Long.toString(lneTime)); } catch (java.text.ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); Log.i("E11111111111", e.toString()); } Intent intent = new Intent(Intent.ACTION_EDIT); intent.setType("vnd.android.cursor.item/event"); if (SDK_INT &gt;= 15) { intent.putExtra(Events.CALENDAR_ID, 1); intent.putExtra(Events.TITLE, "Title"); intent.putExtra(Events.DESCRIPTION, "Title"); intent.putExtra(Events.DTSTART, lnsTime); intent.putExtra(Events.DTEND, lneTime); intent.putExtra(Events.ALL_DAY, 0); intent.putExtra(Events.STATUS, 1); intent.putExtra(Events.VISIBLE, 0); intent.putExtra(Events.HAS_ALARM, 1); } else { intent.putExtra("calendar_id", 1); intent.putExtra("status", 1); intent.putExtra("visibility", 0); intent.putExtra("hasAlarm", 1); intent.putExtra("beginTime", lnsTime); intent.putExtra("allDay", true); intent.putExtra("rrule", "FREQ=YEARLY"); intent.putExtra("endTime", lneTime); intent.putExtra("title", "Title"); intent.putExtra("description", "Title"); } startActivity(intent); </code></pre> <p>Hope it helps you :)</p> <p>Thanks </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload