Add a user configurable URL string to dev settings and migrate the EventLogging URL from EventLoggingEvent.java to Prefs.java. When the user string is specified, use that. When the user string is unspecified, the current logic should be used: when ReleaseUtil.isPreBetaRelease() is true, use "https://deployment.wikimedia.beta.wmflabs.org/beacon/event", otherwise "https://meta.wikimedia.org/beacon/event".
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
create EventLogging dev setting | apps/android/wikipedia | master | +39 -3 |
Event Timeline
I assume this should be in the DeveloperSettingsFragment class ?
PS: Im a new dev to the project.
@AlfredAfutu, yep. DeveloperSettingsFragment and DeveloperSettingsPreferenceLoader and developer_preferences.xml too!
@AlfredAfutu, the user string is presented by DeveloperSettingsFragment. It would look like this:
@Niedzielski Thanks again. I want to be able to see what ive done . How do i access the dev settings on the app?
- Enable developer settings:
- Go to app settings.
- Tap about Wikipedia.
- Tap seven times on the circular Wikipedia logo.
- Press back to go to app settings again.
- Open developer settings from the new icon in the top toolbar.
Developer settings are also enabled by default in the "dev" flavor (under build variants in Android Studio):
@Niedzielski I was trying to see how the developer settings works but after tap seven times on the circular Wikipedia logo I got the following error:
java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to android.support.design.widget.CoordinatorLayout$LayoutParams at org.wikipedia.util.FeedbackUtil.adjustLayoutParamsIfRequired(FeedbackUtil.java:120) at org.wikipedia.util.FeedbackUtil.makeSnackbar(FeedbackUtil.java:115) at org.wikipedia.util.FeedbackUtil.showMessage(FeedbackUtil.java:72) at org.wikipedia.util.FeedbackUtil.showMessage(FeedbackUtil.java:60) at org.wikipedia.settings.AboutActivity$AboutLogoClickListener.showSettingAlreadyEnabledMessage(AboutActivity.java:125) at org.wikipedia.settings.AboutActivity$AboutLogoClickListener.onClick(AboutActivity.java:108)
What should be done when mistakes like these are found? Is it better to create a task with the all the information about the bug? Or do you automatically receive a crash report and after that you see if it is necessary to create a task or not?
@Jcasariego, please open a new bug! The Android app does collect crash reports but detailed tickets are nearly always easier to fix. In this case specifically, the crash may go unnoticed since it's in developer settings. Thank you!
Change 403457 had a related patch set uploaded (by Yashasvi; owner: Yashasvi):
[apps/android/wikipedia@master] create EventLogging dev setting
Hi @Niedzielski
I've created a patch for this.
Here are the screenshots :
One doubt:
Do we also want to move the default dev and prod urls from static fields to Prefs?
Change 403457 abandoned by Dbrant:
create EventLogging dev setting
Reason:
No longer necessary; closing to reduce clutter.