Skip to content

Commit

Permalink
chore(app): prepare release 0.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutoshgngwr committed May 5, 2021
1 parent 08325b3 commit eabedcd
Show file tree
Hide file tree
Showing 122 changed files with 82 additions and 50 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId 'com.github.ashutoshgngwr.noice'
minSdkVersion 21
targetSdkVersion 30
versionCode 39
versionName '0.16.1'
versionCode 40
versionName '0.17.0'
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,6 @@ object EspressoX {
}
}

/**
* [slideInItem] emulates a slide action on a [Slider] with given [sliderID] that is a descendant
* of the provided view.
*/
fun slideInItem(@IdRes sliderID: Int, value: Float): ViewAction {
return object : ViewAction {
override fun getDescription() = "Emulate user input on a descendant slider"
override fun getConstraints() =
hasDescendant(allOf(withId(sliderID), instanceOf(Slider::class.java)))

override fun perform(uiController: UiController, view: View) {
slide(value).perform(uiController, view.findViewById<Slider>(sliderID))
}
}
}

/**
* [withSliderValue] matches a [Slider] with the provided [expectedValue].
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,47 +181,58 @@ class GenerateScreenshots {
onView(withId(R.id.sound_list)).perform(
actionOnItem<RecyclerView.ViewHolder>(
ViewMatchers.hasDescendant(allOf(withId(R.id.title), withText(R.string.light_rain))),
EspressoX.clickInItem(R.id.play_button)
click()
)
)

onView(withId(R.id.sound_list)).perform(
actionOnItem<RecyclerView.ViewHolder>(
ViewMatchers.hasDescendant(allOf(withId(R.id.title), withText(R.string.light_rain))),
EspressoX.slideInItem(
R.id.volume_slider,
Player.MAX_VOLUME.toFloat() - Player.DEFAULT_VOLUME
)
EspressoX.clickInItem(R.id.volume_button)
)
)

EspressoX.waitForView(withId(R.id.volume_slider))
.perform(EspressoX.slide(Player.MAX_VOLUME.toFloat() - Player.DEFAULT_VOLUME))

onView(withId(R.id.positive))
.perform(click())

onView(withId(R.id.sound_list)).perform(
actionOnItem<RecyclerView.ViewHolder>(
ViewMatchers.hasDescendant(
allOf(withId(R.id.title), withText(R.string.distant_thunder))
),
EspressoX.clickInItem(R.id.play_button)
click()
)
)

onView(withId(R.id.sound_list)).perform(
actionOnItem<RecyclerView.ViewHolder>(
ViewMatchers.hasDescendant(
allOf(withId(R.id.title), withText(R.string.distant_thunder))
),
EspressoX.slideInItem(R.id.volume_slider, Player.MAX_VOLUME.toFloat())
ViewMatchers.hasDescendant(allOf(withId(R.id.title), withText(R.string.distant_thunder))),
EspressoX.clickInItem(R.id.volume_button)
)
)

EspressoX.waitForView(withId(R.id.volume_slider))
.perform(EspressoX.slide(Player.MAX_VOLUME.toFloat()))

onView(withId(R.id.positive))
.perform(click())

onView(withId(R.id.sound_list)).perform(
actionOnItem<RecyclerView.ViewHolder>(
ViewMatchers.hasDescendant(
allOf(withId(R.id.title), withText(R.string.distant_thunder))
),
EspressoX.slideInItem(R.id.time_period_slider, Player.MAX_TIME_PERIOD.toFloat() - 300)
ViewMatchers.hasDescendant(allOf(withId(R.id.title), withText(R.string.distant_thunder))),
EspressoX.clickInItem(R.id.time_period_button)
)
)

EspressoX.waitForView(withId(R.id.time_period_slider))
.perform(EspressoX.slide(Player.MAX_TIME_PERIOD.toFloat() - 300))

onView(withId(R.id.positive))
.perform(click())

Thread.sleep(SLEEP_PERIOD_BEFORE_SCREENGRAB)
Screengrab.screenshot("1")
unmockkObject(CastAPIWrapper.Companion)
Expand Down Expand Up @@ -252,7 +263,7 @@ class GenerateScreenshots {
onView(withId(R.id.sound_list)).perform(
actionOnItem<RecyclerView.ViewHolder>(
ViewMatchers.hasDescendant(allOf(withId(R.id.title), withText(R.string.birds))),
EspressoX.clickInItem(R.id.play_button)
click()
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ object WakeUpTimerManager {
/**
* [saveLastUsedPresetID] saves the ID of the preset last used by the user in a Wake-up timer.
*/
fun saveLastUsedPresetID(context: Context, selectedPresetID: String) {
fun saveLastUsedPresetID(context: Context, selectedPresetID: String?) {
val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context)
with(sharedPrefs.edit()) {
putString(PREF_LAST_USED_PRESET_ID, selectedPresetID)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package com.github.ashutoshgngwr.noice.fragment

import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.browser.customtabs.CustomTabColorSchemeParams
import androidx.browser.customtabs.CustomTabsIntent
import androidx.core.content.res.ResourcesCompat
import androidx.fragment.app.Fragment
import com.github.ashutoshgngwr.noice.BuildConfig
import com.github.ashutoshgngwr.noice.R
Expand All @@ -14,11 +16,27 @@ import mehdi.sakout.aboutpage.Element

class AboutFragment : Fragment() {

private lateinit var customTabsIntent: CustomTabsIntent

override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
customTabsIntent = CustomTabsIntent.Builder()
.setDefaultColorSchemeParams(
CustomTabColorSchemeParams.Builder()
.setToolbarColor(
ResourcesCompat.getColor(
resources,
R.color.action_bar,
requireContext().theme
)
)
.build()
)
.build()

return AboutPage(context).run {
setImage(R.drawable.app_banner)
setDescription(getString(R.string.app_description))
Expand All @@ -37,13 +55,28 @@ class AboutFragment : Fragment() {
R.string.app_authors_url
)
)
addWebsite(getString(R.string.app_website))

addItem(
createElement(
R.string.about_website,
R.drawable.about_icon_link,
R.string.app_website
)
)

@Suppress("ConstantConditionIf")
if (BuildConfig.IS_PLAY_STORE_BUILD) {
addPlayStore(requireContext().packageName)
}

addGitHub(getString(R.string.app_github))
addItem(
createElement(
R.string.about_github,
R.drawable.about_icon_github,
R.string.app_github_url
)
)

create()
}
}
Expand All @@ -52,17 +85,15 @@ class AboutFragment : Fragment() {
val version =
requireContext().packageManager?.getPackageInfo(requireContext().packageName, 0)?.versionName
return Element("v$version", R.drawable.ic_about_version)
.setOnClickListener {
customTabsIntent.launchUrl(requireContext(), Uri.parse(getString(R.string.app_changelog)))
}
}

private fun createElement(titleResId: Int, iconId: Int, urlResId: Int): Element {
return Element(getString(titleResId), iconId)
.setOnClickListener {
requireContext().startActivity(
Intent(
Intent.ACTION_VIEW,
Uri.parse(getString(urlResId))
)
)
customTabsIntent.launchUrl(requireContext(), Uri.parse(getString(urlResId)))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class WakeUpTimerFragment : Fragment() {
selectedPresetID = presetIDs[choice]
changedPreset = true
notifyUpdate()
WakeUpTimerManager.saveLastUsedPresetID(requireContext(), selectedPresetID!!)
WakeUpTimerManager.saveLastUsedPresetID(requireContext(), selectedPresetID)
}
negativeButton(R.string.cancel)
} else {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/donottranslate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<string name="app_copyright">2019–21 the Noice Authors</string>
<string name="app_license_url">https://github.com/ashutoshgngwr/noice/blob/master/LICENSE</string>
<string name="app_authors_url">https://ashutoshgngwr.github.io/noice/contributors</string>
<string name="app_changelog">https://ashutoshgngwr.github.io/noice/CHANGELOG</string>
<string name="app_website">https://ashutoshgngwr.github.io/noice</string>
<string name="app_github">ashutoshgngwr/noice</string>
<string name="app_github_url">https://github.com/ashutoshgngwr/noice</string>
<string name="app_issues_github_url">https://github.com/ashutoshgngwr/noice/issues</string>
<string name="app_issues_form_url">
Expand Down
3 changes: 0 additions & 3 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ default_platform(:android)
desc "Generate screenshots of locales for which metadata exists"
lane :generate_screenshots do
locales = sh("LOCALES=$(find metadata/android -mindepth 1 -maxdepth 1 -type d -exec basename {} \\; | sort); printf ${LOCALES\/\/$'\\n'\/','}")
gradle(
task: "clean"
)
gradle(
task: "assemble",
flavor: "Playstore",
Expand Down
Binary file modified fastlane/metadata/android/cs-CZ/images/phoneScreenshots/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/cs-CZ/images/phoneScreenshots/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/cs-CZ/images/phoneScreenshots/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/cs-CZ/images/phoneScreenshots/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/cs-CZ/images/phoneScreenshots/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/cs-CZ/images/phoneScreenshots/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/cs-CZ/images/phoneScreenshots/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/de-DE/images/phoneScreenshots/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/de-DE/images/phoneScreenshots/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/de-DE/images/phoneScreenshots/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/de-DE/images/phoneScreenshots/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/de-DE/images/phoneScreenshots/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/de-DE/images/phoneScreenshots/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/de-DE/images/phoneScreenshots/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/el-GR/images/phoneScreenshots/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/el-GR/images/phoneScreenshots/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/el-GR/images/phoneScreenshots/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/el-GR/images/phoneScreenshots/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/el-GR/images/phoneScreenshots/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/el-GR/images/phoneScreenshots/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/el-GR/images/phoneScreenshots/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/40.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- Added app settings
- Added player style notifications and media button support
- Added option to share presets
- Added app shortcuts for saved presets
- Updated app appearance
- Fixed inability to pin home screen shortcuts below Android 8

We're continuously working to make Noice better. Please turn on updates to never miss a thing!
See detailed changelog at https://ashutoshgngwr.github.io/noice/CHANGELOG.
4 changes: 2 additions & 2 deletions fastlane/metadata/android/en-US/changelogs/default.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
We're continuously working to make Noice better and useful. Please turn on updates to never miss a thing!
See detailed changelog at https://ashutoshgngwr.github.io/noice/CHANGELOG
We're continuously working to make Noice better. Please turn on updates to never miss a thing!
See detailed changelog at https://ashutoshgngwr.github.io/noice/CHANGELOG.
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/6.png
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/7.png
Binary file modified fastlane/metadata/android/es-ES/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/es-ES/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/es-ES/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/es-ES/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/es-ES/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/es-ES/images/phoneScreenshots/6.png
Binary file modified fastlane/metadata/android/es-ES/images/phoneScreenshots/7.png
Binary file modified fastlane/metadata/android/fr-FR/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/fr-FR/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/fr-FR/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/fr-FR/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/fr-FR/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/fr-FR/images/phoneScreenshots/6.png
Binary file modified fastlane/metadata/android/fr-FR/images/phoneScreenshots/7.png
Binary file modified fastlane/metadata/android/hi-IN/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/hi-IN/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/hi-IN/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/hi-IN/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/hi-IN/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/hi-IN/images/phoneScreenshots/6.png
Binary file modified fastlane/metadata/android/hi-IN/images/phoneScreenshots/7.png
Binary file modified fastlane/metadata/android/in/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/in/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/in/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/in/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/in/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/in/images/phoneScreenshots/6.png
Binary file modified fastlane/metadata/android/in/images/phoneScreenshots/7.png
Binary file modified fastlane/metadata/android/it-IT/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/it-IT/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/it-IT/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/it-IT/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/it-IT/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/it-IT/images/phoneScreenshots/6.png
Binary file modified fastlane/metadata/android/it-IT/images/phoneScreenshots/7.png
Binary file modified fastlane/metadata/android/pl-PL/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/pl-PL/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/pl-PL/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/pl-PL/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/pl-PL/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/pl-PL/images/phoneScreenshots/6.png
Binary file modified fastlane/metadata/android/pl-PL/images/phoneScreenshots/7.png
Binary file modified fastlane/metadata/android/pt-BR/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/pt-BR/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/pt-BR/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/pt-BR/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/pt-BR/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/pt-BR/images/phoneScreenshots/6.png
Binary file modified fastlane/metadata/android/pt-BR/images/phoneScreenshots/7.png
Binary file modified fastlane/metadata/android/ru-RU/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/ru-RU/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/ru-RU/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/ru-RU/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/ru-RU/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/ru-RU/images/phoneScreenshots/6.png
Binary file modified fastlane/metadata/android/ru-RU/images/phoneScreenshots/7.png
Binary file modified fastlane/metadata/android/sq/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/sq/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/sq/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/sq/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/sq/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/sq/images/phoneScreenshots/6.png
Binary file modified fastlane/metadata/android/sq/images/phoneScreenshots/7.png
Binary file modified fastlane/metadata/android/tr-TR/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/tr-TR/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/tr-TR/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/tr-TR/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/tr-TR/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/tr-TR/images/phoneScreenshots/6.png
Binary file modified fastlane/metadata/android/tr-TR/images/phoneScreenshots/7.png
Binary file modified fastlane/metadata/android/uk/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/uk/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/uk/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/uk/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/uk/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/uk/images/phoneScreenshots/6.png
Binary file modified fastlane/metadata/android/uk/images/phoneScreenshots/7.png

0 comments on commit eabedcd

Please sign in to comment.