Trying to get the next alarm set string from Settings.System using script.

Trying to get the next alarm set string from Settings.System using script. Using the following but getting an error, any help much appreciated:

LL.bindClass(“android.provider.Settings”);

var alarm = Settings.System.getString(getContentResolver(), Settings.System.NEXT_ALARM_FORMATTED);

Note: I know that the above method was deprecated in Lollipop but am trying to implement this on KK

]]>

4 Commentsto Trying to get the next alarm set string from Settings.System using script.

  1. Anonymous says:

    < ![CDATA[

    Try LL.getContext().getContentResolver()

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Henry Adams thanks, tried the following below but didn’t work … or am I missing something out?


    var alarm = LL.getContext().getContentResolver().getString(Settings.System.NEXT_ALARM_FORMATTED);

    ]]>

  3. Anonymous says:

    < ![CDATA[

    LL.bindClass(“android.provider.Settings”);


    var alarm = Settings.System.getString(LL. getContext(). getContentResolver(), Settings.System.NEXT_ALARM_FORMATTED);


    Android.makeNewToast(alarm, true).show();

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Henry Adams great that worked, thanks a ton!

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *