Skip to content
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

Custom Ambient sense? #3

Closed
frap129 opened this issue Jan 16, 2018 · 8 comments
Closed

Custom Ambient sense? #3

frap129 opened this issue Jan 16, 2018 · 8 comments

Comments

@frap129
Copy link

frap129 commented Jan 16, 2018

Hey, just wondering, what all did you change in your custom ambient sense apk? I have all of the SystemUI changes reverse engineered from SystemUIGoogle, but the settings menu is not showing up on devices that arent pixel.

@denysvitali
Copy link
Owner

The only change that was made to the Ambient Sense APK was to expose some intents in such a way that they could be started w/ adb shell su -c 'am start com.google.intelligence.sense/com.google.intelligence.sense.ambientmusic.AmbientMusicSetupWizard' .
If you have a Nexus - Pixel phone the menu will show up in the settings. For any other device you'll need to use the am start command.

@frap129
Copy link
Author

frap129 commented Jan 26, 2018

Did you see any code that would prevent non-pixel devices from using the service? I've got the settings menu working on all devices (had to whitelist it from battery optimizations) but it never actually listens for music

@dj1818
Copy link

dj1818 commented Jan 28, 2018

Oneplus 5 with stock rom (8.0), latest magisk.

D:\Nexus>adb shell su -c 'am start com.google.intelligence.sense/com.google.intelligence.sense.ambientmusic.AmbientMusicSetupWizardActivity'
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.google.intelligence.sense/.ambientmusic.AmbientMusicSetupWizardActivity }
Error type 3
Error: Activity class {com.google.intelligence.sense/com.google.intelligence.sense.ambientmusic.AmbientMusicSetupWizardActivity} does not exist.

D:\Nexus>adb shell su -c 'am start com.google.intelligence.sense/com.google.intelligence.sense.ambientmusic.AmbientMusicSettingsActivity'
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.google.intelligence.sense/.ambientmusic.AmbientMusicSettingsActivity }
Error type 3
Error: Activity class {com.google.intelligence.sense/com.google.intelligence.sense.ambientmusic.AmbientMusicSettingsActivity} does not exist.

and so don't work, even with given permission for mic.

@denysvitali
Copy link
Owner

You should probably update the Ambient Sense app from the Play Store. Please mind that currently the Ambient Sense feature doesn't work yet.

@frap129
Copy link
Author

frap129 commented Feb 13, 2018

@denysvitali From what I've found, whitelisting the Ambient Sense app from power optimizations makes the menu appear in settings on non-nexus/pixel devices, however, it seems to be locked down on other devices. Do you you know if it works on Nexus 6P/5X and Pixel 1 devices? I'm still researching how the app blocks non-nexus/pixel devices.

@denysvitali
Copy link
Owner

I've got that menu on a Nexus 6P by using the latest Android build (8.1) and applying this module.
Unfortunately I haven't found a way to make it work (to recognize the songs) on any device I tested so far (Oneplus One, Oneplus 5T, Nexus 6P, Pixel C)

@frap129
Copy link
Author

frap129 commented Feb 13, 2018

Ahh, ok. I was looking through the source and found an array of device names that included marlin, sailfish, angler, and bullhead, and thought that it may work on those. Just a fair warning (that you probably know already), SystemUI requires modification for it to show on the lockscreen, but notifications dont, so make sure thats enabled.

@denysvitali
Copy link
Owner

Tbh my goal was to achieve the notification feature first, then work on the lockscreen (which as you said requires a modification on the System UI, precisely on the Ambient Display).
At the moment neither the notifications nor the Lockscreen displays anything about the song being recognized

@frap129 frap129 closed this as completed Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants