New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add uri scheme for opening timer by opening a link #79
Conversation
import android.content.Intent | ||
import android.content.IntentFilter | ||
import android.content.SharedPreferences | ||
import android.content.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The IDE changed this, is the wildcard import a problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems for some people this is important, I don't care either way
} | ||
|
||
for (timeStr in data.getQueryParameter("times")!!.split(",").toTypedArray()) { | ||
val time = Integer.valueOf(timeStr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested what happens
- when
times=
(empty param) - when
times=,
- when
times=@€(@,€(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, good point... The last two raise an unhandled error. I've added a try/catch and a check whether the timer list is empty after parsing.
Merged, thank you! |
ah, forgot, could you add a short note to the readme to document this feature? Otherwise it will be very hidden. |
sure, added in #80 |
for #15
@tzugen can you please take a look?
link scheme is like this:
bodhi://timer?times=60,120
(will start a 1 minute and a two minute timer)Pausing does not work properly, but I think that is not necessary to support initially.