What's X_AUDIO_DEFAULT_SERVICE_CHANNEL? - android

My wife has tiktok on her phone, it's an old Huawei Nova 3i, suddenly the notification of receiving a message changed. After I played around with the notifications' sounds I changed that of a direct message, however and scrolling down, I noticed another enabled notification sound named:
X_AUDIO_DEFAULT_SERVICE_CHANNEL
I disabled it, looked it up online as "what's X_AUDIO_DEFAULT_SERVICE_CHANNEL"
I found this link:
https://mogua.co/view_file/?file=X/C67006QSk.java&md5=61e8aae62e843b22cf9dc1cbe9f6e82e&type=apk&appname=TikTok&lines=126,142,128
I urlscanned it, then scamadviced it: nothing
Opened it: saw some code in there
Not sure what it is, any professional opinion, please!
Should we worry about her data?!

Related

KEYCODE_MEDIA_PLAY_PAUSE intercepted by Google Assistant

I wrote an Android app with a button that raises KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE to control third party media player apps. This works perfectly for several days or weeks, but then the key event starts being intercepted by Google Assistant, which is ostensibly turned off. Sometimes it pops up a notification inviting me to turn on various Google Assistant features. Sometimes it speaks the time. And sometimes it just makes the Google Assistant sound but does nothing else. In any case, sometimes the key event is also received by third party media players, sometimes not. Rebooting the device resolves the issue for another week or two.
The app is extremely simple. Here's the related code:
In onCreate:
findViewById(R.id.play_button).setOnClickListener(view -> {
sendKey(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE);
});
And the definition of sendKey:
private void sendKey(int keyCode) {
KeyEvent down = new KeyEvent(KeyEvent.ACTION_DOWN, keyCode);
mAudioManager.dispatchMediaKeyEvent(down);
KeyEvent up = new KeyEvent(KeyEvent.ACTION_UP, keyCode);
mAudioManager.dispatchMediaKeyEvent(up);
}
I know this kind of bizarre behavior is often device- or carrier-specific, so I don't know how to further investigate or report it unless someone else has encountered the same issue. Have you seen this, and is there a solution? The device I've experienced this on is a fully updated Motorola Moto G7 Supra from cricKet, running Android 10.
A deleted answer linked to this article: How to Stop Google Assis­tant from Pop­ping up Randomly. The article seems to have been written for Android 9, and some of the options have already changed in Android 10, so reproducing the content of the article wouldn't be very valuable. The takeaway from the article is that turning off the Google Assistant malware doesn't actually turn it off. You have to opt out in multiple places, and Google keeps adding more. Anyone who finds this Q&A in the future should browse the settings for more new switches.
As I mentioned in the question, Google Assistant was already "turned off" on my device (procedure 1, step 4 in the article). But there's a new section of Assistant Settings titled Your Apps. Each app listed there has a switch labeled Let your Assistant learn from this app.
My device had been running for a couple weeks and Google Assistant was messing with my key events. I turned off the "learn" switch for the app in question and the problem went away without a reboot.
Edit: approximately three weeks after turning off "learning" seemed to solve the problem, it came back. I have now resorted to force closing and disabling the Google app.

Android TalkBack says repeatedly "Service [my app name]"

I have a popular read aloud app, that is also often used by visually impaired and blind people. Some, very few of them complain that when using the app or having it read aloud, it repeatedly says "Service at Voice" (my app's name is #Voice Aloud Reader). I tested this on several phones with different versions of Android and TalkBack enabled, but couldn't reproduce this problem.
The app is showing a notification with reading progress and buttons to pause/resume, FF and reverse etc. Of course all the reading aloud is done from a service, not activity, because a user may want to close my activity, or even turn off screen, and still listen. I would gladly post more technical details, but don't know which ones are relevant.
I tried searching for any combination of terms "TalkBack saying 'service' repeatedly", but cannot find anything relevant. My users who contacted me about this could not find either any setting in TalkBack app to make it stop saying this. Could anyone shed some light on this issue?
I found the reason for my problem, part of it was my own app code, and part just confusing behavior of Android system and TalkBack on different devices. Here is what was happening:
The app, #Voice Aloud Reader, reads text loaded into it (web pages, docs, books) and highlights the sentence it reads aloud. On each change of sentence it updates progress, both on its own screen if visible, and in the notification. The notification update code is pretty old, from Android 4 days. I did not know then how to update the content of notification, it seemed to me that the only way to update it, after using NotificationBuilder to update content, was to call in my service again:
startForeground(/* id: */ 1000, myNotifBuilder.build());
It worked well for years, also under TalkBack, no problems. Even today on at least 5 test devices I have with Android 5 to 9 and with emulators, TalkBack activated, it works correctly. But some users reported that upon reading each new sentence (progress update), TalkBack says "Service #Voice". I finally updated the code as follows, and my users report that the problem is solved:
if (newNotification) {
startForeground(/* id: */ 1000, myNotifBuilder.build());
}
else {
NotificationManagerCompat.from(this).notify(1000, myNotifBuilder.build());
}
I doubt that this knowledge will help many people, now notifications are documented better and there is a clear "Update notification" chapter that explains how to do this correctly in Google documents for developers.
I bet it's announcing the app name on orientation changes each time the MainActivity is created.
SO link

Popup on AOD and Off Screen

I just port my notfifcation class to Oreo and got a question how do Whatsapp and over Apps show a small popup on AOD or if the screen is completly off ? Because the popups look the same as I think I thought that this maybe a standrd thing, but did'nt found anything about this in the notificastion section of the developer doc. This is how looks like:A snapshot of a Whatsapp Msg and below another Message from a Settings dialog
OK, I found it. I must wake the screen before sending the notification, than it looks exactly like the snapshot's. If somebody is interested I can post the code.

Cast Receiver App does not show subtitles

According to the Release Notes (of July 8), the docs for the Sender and the updated answer of this question, the Styled Media Receiver of Google Cast does now support Closed Captioning or Subtitle tracks.
However, when I tell the Default or the Styled Media Receiver to show a text track, nothing happens. It does not even load the .vtt from the server, as I can see in the logs.
I can tell the receiver app got the text tracks just fine, but even using the Android example app, the subtitles never show up. According to all the logs, they are being sent and the receiver app is told to show them - but they never appear, they are never even loaded.
The MediaTrack is being created as follows:
new MediaTrack.Builder(2, MediaTrack.TYPE_TEXT)
.setName("Deutsch")
.setSubtype(MediaTrack.SUBTYPE_CAPTIONS)
.setContentId("https://example.com/video/caption_de.vtt")
.setContentType("text/vtt")
.setLanguage("de").build();
I have checked thrice that the file exists and is being loaded with the type text/vtt. But that does not matter, as the file is never even requested by the player. I have tried both MediaTrack.SUBTYPE_CAPTIONS and MediaTrack.SUBTYPE_SUBTITLES.
So I need to know, is this claimed support of CC in the Styled Media Receiver simply a lie? Or is there some undocumented trick required to make it possible?
If there is still a custom receiver required, I would like to know how to convert the example player to support subtitles, as it doesn't seem to support them either.
First, I suggest you change your wording in future posts (re: "..is simply a lie.."); that is not appropriate at all. Secondly, it works and you can test that with the CastVideos-android app (or ios variation of it for that matter); the first three videos have CC. Lastly, we have documentation on that subject on our documentation site (https://developers.google.com/cast/docs/android_sender, under "Using the Tracks API").

So how can I see the logs in Jelly Bean?

I used to use an app called Log Collector to see system logs. It would send them to my email or via bluetooth,
However, on Jelly Bean the "read log" permission for apps no longer exists and apps can't read the logs, and Log Collector is obviously no exception.
So does one now need to root the device to see system logs? There must be a way for the user to read them. I don't need to access them from an application, I need to read them as a human being. Is there a way?
I got the answer in this google groups thread:
https://groups.google.com/forum/?fromgroups#!searchin/android-developers/READ_LOGS/android-developers/6U4A5irWang/8xOi74KfRIYJ
the message by Mark Murphy replying to Matteo Sisti Sette (which is me).
(it doesn't seem to be possible to link to a particular message, is it?)
POWER + VOLUME_UP + VOLUME_DOWN will generate a report and a screenshot that you can send via email or upload to Drive (ridiculous you can't share it in an arbitrary way such as send via bluetooth or open as text file, but anyways).
(seems you have to hold them for a while and the action is launched when you release them)
At first I thought he was making fun of me and that would just reboot or something, but then I tried and it works.
Quote from Google+ and credits to +Ian Clifton :
"If you go into the developer options of a device running 4.2, you can check the box to add the Bug Report option to the power menu. This also adds it to the quick notifications menu (not sure of the proper name, but slide down the notification shade with two fingers on a phone or on the right side of a tablet)."
..and that would be right answer.. Cheers

Categories

Resources