Run Timer On Background Using Background Service In Sketchware Pro

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ธ.ค. 2024

ความคิดเห็น • 32

  • @The-Dev-Ninja
    @The-Dev-Ninja 3 ปีที่แล้ว +1

    very good

  • @MohammedKhlifaAlherk
    @MohammedKhlifaAlherk 3 ปีที่แล้ว

    nice man ❤

  • @broadcomarabia
    @broadcomarabia 3 ปีที่แล้ว +2

    How To Solve Crashes & Restarting Service?

  • @MrMalbani
    @MrMalbani 3 ปีที่แล้ว +1

    Android 10 and above?

    • @DuoEdgeStudiosSketchware
      @DuoEdgeStudiosSketchware  3 ปีที่แล้ว +2

      No bro it's upto android 9

    • @MrMalbani
      @MrMalbani 3 ปีที่แล้ว

      @@DuoEdgeStudiosSketchware can u make new one for 10 or above?

    • @MarcosSantosProfeta-SAPR
      @MarcosSantosProfeta-SAPR 3 ปีที่แล้ว

      @@DuoEdgeStudiosSketchware já tem para Android 10 e 11 ?

    • @ospppppp
      @ospppppp 2 ปีที่แล้ว +1

      @@MarcosSantosProfeta-SAPR Do you want my help?

  • @mod_gta
    @mod_gta 3 ปีที่แล้ว

    Help me sir, how it working when button clicked with 24 hours or day duration?

    • @DuoEdgeStudiosSketchware
      @DuoEdgeStudiosSketchware  3 ปีที่แล้ว +1

      Go to the service file and search for number ; 500 then change it to 86,400 (seconds) or change change timer duration from 1000 to 60000 and number ; 1440 , this way the timer will tick every minute until 24 hrs

    • @mod_gta
      @mod_gta 3 ปีที่แล้ว

      @@DuoEdgeStudiosSketchware now if i've Textview1, how user get the remaining times when user comeback to my app?

    • @DuoEdgeStudiosSketchware
      @DuoEdgeStudiosSketchware  3 ปีที่แล้ว +1

      @@mod_gta it will display the remaining time as the count down is already saved in shared preferences, even if the user switches off the phone, the timer will still run with the help of shared preferences

    • @mod_gta
      @mod_gta 3 ปีที่แล้ว +1

      @@DuoEdgeStudiosSketchware thanks sir

    • @mod_gta
      @mod_gta 3 ปีที่แล้ว

      @@DuoEdgeStudiosSketchware sir i sett to 24hour countdown, but how to create textview with time format with 24 hour (example 23:56:13) with key numberValue

  • @mmpracticalguides2039
    @mmpracticalguides2039 2 ปีที่แล้ว

    Hello Sir
    I created it , it restart from the start point ( 500 ) after screen close and reopen. I mean counter not continue display.

    • @DuoEdgeStudiosSketchware
      @DuoEdgeStudiosSketchware  2 ปีที่แล้ว +1

      Good, you can change the timer to 0 and make it increase every second from the service file

  • @tragertonmusic1284
    @tragertonmusic1284 2 ปีที่แล้ว

    Hi first that. I find your tutorials great and thank you for the work you invest. For a long time I use codes of you. Arab SMS Now I have a question about this tutorial.
    My app does the following. The app sends an SMS at an interval specified by the user.
    That's the way it works. If a certain condition is met, the more block nowTimeToSend is executed
    A timer component in the more block does this.
    In your tutorial, the code states that the event must be in OnCreate so that the timer remains active in the background.
    I have two timers running. T1 controls the SMS T2 continuously monitors the battery status.
    Both must be running in the background as the timers stop when the app is not visible.
    Many thanks in advance.
    Do I have to change the app now so that the timed event is created within the onCreate.?????

    • @DuoEdgeStudiosSketchware
      @DuoEdgeStudiosSketchware  2 ปีที่แล้ว

      Yes, you have to open the app to activate the logic process at Oncreate to drive it in the background service,
      Or
      You can create a condition where the app auto-restarts when the device is switched on..but this method does not work solidly in sketchware yet so i would advice the first method

    • @DuoEdgeStudiosSketchware
      @DuoEdgeStudiosSketchware  2 ปีที่แล้ว +2

      Thank you for your support too 👍

    • @tragertonmusic1284
      @tragertonmusic1284 2 ปีที่แล้ว +1

      @@DuoEdgeStudiosSketchware I have now changed everything and the service is starting. I find that the solution doesn't really help me.
      1. The user uses the option to specify when text messages should be sent. In the optionActivity
      2. If optionActivity is closed, MainActivity onStart() checks the user variables and sets the timer for sending.
      3. In this way, the cancel pulse for the timer is also triggered. However, the onCreate method is only called when the app is started.
      I have no way of reacting to the user variables.
      onStart is always called when the activity becomes visible and the variables from the optionActivity are queried via shared data.
      My timers for battery monitoring and sending SMS must be able to be deactivated or run in the background.
      This is not possible for me in onCreate, since I cannot intercept the user variables with every change, but only when the app starts If the activity is not visible. on stop e.g. Many greetings Chris

  • @johnr.aucoin1990
    @johnr.aucoin1990 3 ปีที่แล้ว

    background service android 7 plz

    • @DuoEdgeStudiosSketchware
      @DuoEdgeStudiosSketchware  3 ปีที่แล้ว +2

      This method works on android 7

    • @ospppppp
      @ospppppp 2 ปีที่แล้ว

      @@DuoEdgeStudiosSketchware Do you want my help?

  • @Shiv_charan1234
    @Shiv_charan1234 3 ปีที่แล้ว

    Can you please make an app which will save a file directly to firebase storage without storing that file in internal storage . For example when a screen shot is taken it should store to firebase storage and it should not store to internal storage.Please make an app like that🥺

    • @Shiv_charan1234
      @Shiv_charan1234 3 ปีที่แล้ว

      No one did this before

    • @AbhiThakur0001
      @AbhiThakur0001 3 ปีที่แล้ว

      One thing you can do is first save the media in Internal Storage and upload and onUploadSuccess delete the file path.

    • @DuoEdgeStudiosSketchware
      @DuoEdgeStudiosSketchware  3 ปีที่แล้ว +1

      @@AbhiThakur0001 that's one way

    • @DuoEdgeStudiosSketchware
      @DuoEdgeStudiosSketchware  3 ปีที่แล้ว +1

      @@Shiv_charan1234 I'll make a tutorial on this soon