ShareShortcuts

Charging Time

Know how many time till your phone is fully charged!

ammrmuhmmed
Fork “Charging Time”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so ammrmuhmmed gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
213K
Saved
9
Actions
19
Category
Utilities
Version
1.0
Language
EN

Know how many time till your phone is fully charged!

What's New

Version 1.0

First release

Version History
1.0 May 4, 2022

First release

What it does

19 actions
  1. Comment
    This Shortcut Made By Ammrmuhmmed My Instagram : @ammrmuhmmed
  2. Get Battery Level
  3. Calculate
  4. Set Variable
    battery needed
  5. Calculate
  6. Calculate
  7. Round Number
  8. Set Variable
    time left
  9. If
  10. Calculate
  11. Set Variable
    minutes
  12. Show Result
  13. If
  14. If
  15. Calculate
  16. Set Variable
    minutes
  17. Show Result
  18. If
  19. Show Result

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#include 'actions/math'
#include 'actions/device'
#define color green
#define glyph battery

/*
This Shortcut Made By Ammrmuhmmed
My Instagram : @ammrmuhmmed
*/
const NiveauDeLaBatterie = getBatteryLevel()
@BatteryNeeded = 100 - NiveauDeLaBatterie
const RsultatDuCalcul = @BatteryNeeded * 110
const RsultatDuCalcul1 = RsultatDuCalcul / 60
round(RsultatDuCalcul1)
@TimeLeft

if @TimeLeft > 120 {
	@minutes = @TimeLeft - 120
	show("Your phone is at {NiveauDeLaBatterie}%\nIt will take 2 hours and {@minutes} minutes to charge to 100%")
}

if @TimeLeft > 60 {
	if @TimeLeft <= 120 {
		@minutes = @TimeLeft - 60
		show("Your phone is at {NiveauDeLaBatterie}%\nIt will take 1 hour and {@minutes} minutes to charge to 100%")
	}
} else {
	show("Your phone is at {NiveauDeLaBatterie}%\nIt will take {@TimeLeft} minutes to charge to 100%")
}
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

More by ammrmuhmmed

See All

You Might Also Like

See All
Advertisement