1. Are you ready for the Galaxy S20? Here is everything we know so far!

Need help

Discussion in 'Android Apps & Games' started by Waspaman, Jul 8, 2017.

  1. Waspaman

    Waspaman Lurker
    Thread Starter

    I am trying to set up a widget that displays the day of the week only for that day. The next day would appear in another location within the same widget and so on.
     



    1. Download the Forums for Android™ app!


      Download

       
  2. Welcome to Android Forums.

    Your description is pretty sketchy. Display the day of the week only for the day? Appear in another location within the widget?

    What have you created so far?

    ... Thom
     
    Phalon4 likes this.
  3. Phalon4

    Phalon4 Android Enthusiast

    Sounds to me like you want a custom built app set for your specifications.
     
  4. Waspaman

    Waspaman Lurker
    Thread Starter

    I am making a widget to display the time, date, weather, battery.......
    I have 7 individual boxes for the day of the week. I am trying to have the current day appear in it's designated box while the other days, also in their own designated boxes remain blank.
     
  5. The key to learning Tasker is to start out simple and nibble away at enhancing it. Can you currently display the day of the week? Do you have anything working in the task yet?

    If you long press on the task name you can choose ... settings / Export / Description to clipboard and then paste them into a post here.

    This flashes the current day ...

    Dev5
    A3: Variable Set [ Name:%par1 To:%TIMES Recurse Variables:Off Do Maths:Off Append:Off ]
    A1: Variable Set [ Name:%par2 To:dddd Recurse Variables:Off Do Maths:Off Append:Off ]
    A2: Perform Task [ Name:getFormattedDate Priority:%priority Parameter 1 (%par1):%par1 Parameter 2 (%par2):%par2 Return Value Variable:%wrk Stop:Off ]
    A3: Flash [ Text:%wrk Long:On ]

    getFormattedDate
    Run Both Together
    A1: JavaScriptlet [ Code:var gsMonthNames = new Array(
    'January',
    'February',
    'March',
    'April',
    'May',
    'June',
    'July',
    'August',
    'September',
    'October',
    'November',
    'December'
    );

    var gsDayNames = new Array(
    'Sunday',
    'Monday',
    'Tuesday',
    'Wednesday',
    'Thursday',
    'Friday',
    'Saturday'
    );

    var d = new Date(par[0] * 1000);
    var f = par[1];

    var formatteddate = f.replace(/(yyyy|yy|mmmm|mmm|mm|dddd|ddd|dd|hh|nn|ss|a\/p)/gi,
    function($1)
    {
    switch ($1)
    {
    case 'yyyy': return d.getFullYear();
    case 'yy': return ('0' + d.getFullYear()).slice(-2);
    case 'mmmm': return gsMonthNames[d.getMonth()];
    case 'mmm': return gsMonthNames[d.getMonth()].slice(0,3);
    case 'mm': return ('0' + (d.getMonth() + 1)).slice(-2);
    case 'dddd': return gsDayNames[d.getDay()];
    case 'ddd': return gsDayNames[d.getDay()].slice(0,3);
    case 'dd': return ('0' + d.getDate()).slice(-2);
    case 'hh': return ('0' + ((h = d.getHours() % 12) ? h : 12)).slice(-2);
    case 'HH': return ('0' + d.getHours()).slice(-2);
    case 'nn': return ('0' + d.getMinutes()).slice(-2);
    case 'ss': return ('0' + d.getSeconds()).slice(-2);
    case 'a/p': return d.getHours() < 12 ? 'a' : 'p';
    }
    }
    ); Libraries:45 Auto Exit:On Timeout (Seconds):45 ]
    A2: Return [ Value:%formatteddate Stop:On ]

    ... yes it is a t least an intermediate solution.

    ... Thom
     
    #5 Thom, Jul 9, 2017
    Last edited: Jul 9, 2017
  6. What have you developed so far? You can long press on the task name and select settings / export / Description to Clipboard and then paste it into a post here.

    ... Thom
     
    buathonghadchaiyapom likes this.

Tasker

Tasker Forum

net.dinglisch.android.taskerm

⚙No repetitive tasks for you, let your Android device handle it!⚙
Total Automation, From Settings to SMS. Here are only some
of the things you could do with Tasker. Its real power is the flexibility to combine contexts and tasks however you wish: https://tasker.joaoapps.com/exampleuses.htmlAutomations
Make your phone a true smart
phone! Why remember to change the volume every day when you leave home when your phone can do it for you? Automate stuff based on the app you're in
, the time of day
, your location
, your Wi-Fi network
, Received SMS or Calls
, the currently playing song
and many other (130+) states and events! Check out how easy it is to create an automation: https://www.youtube.com/watch?v=s6EAbLW5WSkActions
350+ actions allow you to truly customize your phone like never before! Send SMS, create notifications, change almost any system setting like Wifi Tether, Dark Mode, Always On Display, change any volume, control Do Not Disturb, open apps, file manipulation, control music playback, get your location... you get the idea. If you can think of it, Tasker can probably do it for you! Note: root is NOT (I repeat NOT) required for majority of the functions.
However, a few of the actions (like the Airplane Mode action and the Mobile Data action on some devices) require root. Regarding those few actions that do require root, this is because of Android security policies that developers cannot work around. ☑ Other Triggers
Manually trigger your actions via launcher shortcuts, quick setting tiles, widgets, long-pressing volume buttons, media buttons (like the ones on your BT headsets or headphones), Bixby button, Navigation Bar, Notificaitons and more! ☑ Join - Remote Tasker
Adding Join (https://play.google.com/store/apps/details?id=com.joaomgcd.join) to the mix will even allow you to trigger tasks from another Android device or PC! ☑ Scenes
Design your own UI and use it to display any info you want or trigger any task! ☑ App Creation
Create your own standalone apps to share or sell with the Tasker App Factory (https://play.google.com/store/apps/details?id=net.dinglisch.android.appfactory)! ☑ Developer Friendly
A lot of 3rd party developers already allow you to perform actions in their apps and listen to their events/states through Tasker! Check out a list of plugins https://tasker.joaoapps.com/pluginlist.html. You can also call most of the Web APIs from Tasker with the powerful HTTP Auth and HTTP Request actions! Check out an example https://youtu.be/yAt2D1XmgUI. ☑ 7 day trial - one time payment to unlock
Get it here: https://tasker.joaoapps.com/download.htmlUseful Links
Starter Guides: https://tasker.joaoapps.com/guides.html Pre-made projects: https://forum.joaoapps.com/index.php?resources/ Official Support Forumhttps://groups.google.com/forum/#!forum/tasker Community full of people willing to help: https://www.reddit.com/r/tasker/ It's not possible to fix problems reported via Play Store Comments so please use the "Report Issue To Developer" option in the app > Menu to do so. Note
: Tasker uses the BIND_DEVICE_ADMIN permission in order to provide the System Lock functionality

READ MORE
February 15, 2020
Last Updated
4.4
Rating
1M+
Installs
Loading...
Similar Threads - Need help
  1. amber moore
    Replies:
    7
    Views:
    261
  2. augustya30
    Replies:
    2
    Views:
    167
  3. rookiegunner
    Replies:
    2
    Views:
    249
  4. archfiendangel
    Replies:
    1
    Views:
    526
  5. Vincenzo123
    Replies:
    19
    Views:
    1,386
  6. groston
    Replies:
    4
    Views:
    540
  7. rentokil
    Replies:
    4
    Views:
    547
  8. MrKrab
    Replies:
    13
    Views:
    678
  9. MAK37
    Replies:
    12
    Views:
    1,545
  10. Turk9
    Replies:
    0
    Views:
    774

Share This Page

Loading...