Modified Activity Starter to allow

3,649 views
Skip to first unread message

pepemont

unread,
Jul 13, 2017, 1:28:20 PM7/13/17
to MIT App Inventor Forum
Hello everyone,

I was able to modify Activity Starter (as a new extension call Xactivity Starter) to allow setting beginTime and endTime of an event into Android calendar.

The change to code source was trivial :


if (key.length() != 0 && value.length() != 0) {
        Log.i("ActivityStarter", "Adding extra (pairs), key = " + key + " value = " + value);


        if (key.startsWith("B.")) {
key = key.substring(2);
intent.putExtra(key, Byte.parseByte(value)); };

        if (key.startsWith("l.")) {
key = key.substring(2);
intent.putExtra(key, Long.parseLong(value));}

        else intent.putExtra(key, value);
      }
    }

    return intent;
  }

Any key starting with "B." or "l." will be passed as boolean or long respectively.


Example of use :


Enjoy !


be.tabularium.appinventor.aix

Taifun

unread,
Jul 13, 2017, 3:39:30 PM7/13/17
to MIT App Inventor Forum
thank you for your contribution to the App Inventor community!
Taifun

Abraham Getzler

unread,
Jul 14, 2017, 3:16:33 PM7/14/17
to MIT App Inventor Forum

Taifun

unread,
Nov 6, 2017, 8:23:49 PM11/6/17
to MIT App Inventor Forum
reopened
Taifun
Reply all
Reply to author
Forward
Message has been deleted
0 new messages