Closed Bug 1830937 Opened 1 year ago Closed 1 year ago

Make debugging APIs available on Android

Categories

(Data Platform and Tools :: Glean: SDK, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: brizental, Assigned: travis_)

Details

Attachments

(1 file)

I mean available from the code, not the activity. I can't test with the activity when adding Glean to a service... Or I don't know how to. Either way that would be convenient.

This would entail making some internal functions public:

https://github.com/mozilla/glean/blob/main/glean-core/android/src/main/java/mozilla/telemetry/glean/Glean.kt#L481
https://github.com/mozilla/glean/blob/main/glean-core/android/src/main/java/mozilla/telemetry/glean/Glean.kt#L424
And likely add a function for submitting pings, since submitPingByName requires a reason and it may be a bit much to ask the consumer to get this right.

Another option would be to create a new debug activity that can launch a service. Instead of this: https://github.com/mozilla/glean/blob/306fb0b3d4783360768aaac852ba734945a57cd1/glean-core/android/src/main/java/mozilla/telemetry/glean/debug/GleanDebugActivity.kt#L157, we would instead use this: https://developer.android.com/reference/android/content/Context.html#startService(android.content.Intent) to launch the service.

FWIW, in my use case I would be happy with just setLogPings and setDebugViewTag being public. Submit ping is not something I am missing at the moment.

Assignee: nobody → tlong
Priority: -- → P2
Priority: P2 → P1
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: