Hello
Is there any way to listen for volume changes with an android service and react to that?
Btw how do the google music app allow the user to control the media volume even when the music is playing in the background?
Thanks!
kevdliu said:
Hello
Is there any way to listen for volume changes with an android service and react to that?
Btw how do the google music app allow the user to control the media volume even when the music is playing in the background?
Thanks!
Click to expand...
Click to collapse
yes there is a way
there is an action for broadcast recieving that call VOLUME_CHANGED_ACTION
try this code in your manifest app:
<receiver android:name="VolumeChange_Receiver" >
<intent-filter>
<action android:name="android.media.VOLUME_CHANGED_ACTION" />
</intent-filter>
</receiver>
this is a hidden Action!!
you can check this app which use this method
that's called 2D Volume
Download link in attachment
thank you
amir.ghm said:
yes there is a way
there is an action for broadcast recieving that call VOLUME_CHANGED_ACTION
try this code in your manifest app:
<receiver android:name="VolumeChange_Receiver" >
<intent-filter>
<action android:name="android.media.VOLUME_CHANGED_ACTION" />
</intent-filter>
</receiver>
this is a hidden Action!!
you can check this app which use this method
that's called 2D Volume
Download link in attachment
thank you
Click to expand...
Click to collapse
thanks
Related
The app was published about a month ago, and when I do a search for the exact name of the app Turbo Verse it ranks very low 25th at the highest, currently its #92.
I understand the basic SEO rules for the play store (downloads, rankings, compatibility etc.) but I feel this is an anomaly because this is the only app in the entire store that contains the words Turbo and Verse in the title and I can see no reason why it shouldnt be ranked very high for the exact name.
I was thinking it may have something to with the manifest so I will post it below, I have 18 reviews, mostly positive and over 100 downloads.
The full name of the App as it appears in the store is: Turbo Verse KJV - Bible Memory but I am only typing in the first part: Turbo Verse, but when I type the whole name into the search its still ranking about 9 or 10th
I would really appreciate any advice, I am a new developer and I would like to learn from my mistakes.
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="url removed because I can post a link in this forum"
package="com.turboverse.scripturememory"
android:versionCode="2"
android:versionName="1.01" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="10" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:description="@string/appDescription"
>
<activity
android:name="com.turboverse.scripturememory.MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:launchMode="singleTop" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".RequestVerse" android:screenOrientation="portrait" />
<activity android:name=".ByReferenceBookList" android:screenOrientation="portrait" />
<activity android:name=".ByTopicList" android:screenOrientation="portrait" />
<activity android:name=".Chapters" android:screenOrientation="portrait" />
<activity android:name=".Verses" android:screenOrientation="portrait" />
<activity android:name=".PlayVerse" android:screenOrientation="portrait" />
<activity android:name=".MyVersesList" android:screenOrientation="portrait" />
<activity android:name=".ChapterVerses" android:screenOrientation="portrait" />
<activity android:name=".UpdateDownloadVerses" android:screenOrientation="portrait" />
<service android:name=".TurboVerseService" />
</application>
<!-- application android:name="GlobalObjects" android:label="@string/app_name" /-->
<uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"><group gid="media_rw"></group></uses-permission>
<supports-screens android:resizeable="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true" />
</manifest>
Hi all, I have modded the Galaxy S5 mixer_paths.xml so that it will use earpiece aswell while playing music, watching youtube etc.
I found this on monivan's stereomod thread for the xperia Z (which i have) and I find it so cool that I wanted this on my wife's S5 so now I'm sharing here with you!
First of all, PLEASE DO A BACKUP OF YOUR CURRENT FILE BEFORE PROCEEDING!!
It is located in /system/etc/mixer_paths.xml
DISCLAIMER:
Everything you do is your choice, if you missing any important call or getting fired because of alarm didn't work, you busting your earpiece or thermonuclear war starts off and you point your finger at me, I will laugh at you.
I take no responsibility for your actions.
REQUIREMENTS :
-Rooted phone with busybox installed
-Stock rom (may also work on AOSP/CM, don't know try it yourself and let know here)
-galaxy s5 g900f
-users reported to work on note 10.1 and s4 also.
HOW TO INSTALL:
1. Download mixer_paths_xx_xx.zip
(Download links in download section)
(if not available request desktop version)
2. Move your stock/current mixer_paths.xml from /system/etc to any location on your sd card.
3. Unzip the zip file you just downloaded and copy mixer_paths.xml to /system/etc and set correct permission rw-r-r a.k.a. 0644
Like this:
XX0
X00
X00
4. Reboot
5. Turn down your volume before using and increase slowly to test safely.
I tuned volume values so that sound is not distorting at all kind of genres, with stock Samsung music player at full volume with no equaliser settings active.
But please be careful using this!!
Also I think S5 has much better earpiece than xperia Z or Z1, much more clear bass coming thru.
To test if this works see: Left/Right Stereo Audio/Visual Test.: http://youtu.be/dvqbq_0jZ_U
Have fun!
NOTE:
I now have made multiple versions made, to better fit everybody's needing.
I have made loud and normal versions, and I have made version with and without combined channels.
SINGLE AND DUAL CHANNEL?
I don't have to tell you guys what means loud and what means normal, but.. What means separated and combined channels?
Let's say, "RX1" is earpiece and "RX7" is loudspeaker. Those are hardware components.
Let's now say, we have an left and right channel. "RX1" and "RX2".
You might be thinking "why is RX1 earpiece and channel at the same time?"
-it isn't. Doesn't matter but read further.
Separate channel will mean left channel for example will play on earpiece (rx1 is playing rx2) and right channel is playing loudspeaker (rx7 is playing rx1)
Combined channel will mean left and right channels will both play on earpiece and loudspeaker at same time (rx1 is playing rx1 and rx2, and rx7 is playing rx1 and rx2)
TUTORIAL:
So, how to edit this to your exact needs?
Simple, open the xml file and goto somewhere around line 450. (Using 920 text editor from play store works fine)
You will see something like this ================================================================ -->
<!-- Play Scenario -->
<path name="handset">
<path name="rcv" />
<ctl name="EAR PA Gain" value="POS_3_DB" />
<ctl name="RX1 Digital Volume" value="84" />
</path>
<path name="speaker">
<path name="spk" />
<ctl name="HPHL Volume" value="20" />
<ctl name="HPHR Volume" value="20" />
<ctl name="EAR PA Gain" value="POS_3_DB" />
<ctl name="RX1 Digital Volume" value="86" />
<ctl name="RX7 Digital Volume" value="74" />
<ctl name="SPK DRV Volume" value="8" />
<ctl name="COMP0 Switch" value="1" />
</path>
<path name="headset">
<path name="ear" />
<ctl name="HPHL Volume" value="20" />
<ctl name="HPHR Volume" value="20" />
<ctl name="RX1 Digital Volume" value="79" />
<ctl name="RX2 Digital Volume" value="79" /
<ctl name="COMP1 Switch" value="1" /
path>
The thing you want to adjust are in the "speaker" section.
Rx1 and rx7 digital volumes.
Just remember:
Rx1 is earpiece in this section and rx7 is loudspeaker in this section.
Also you can adjust headphone volume , it is just beneath speaker section.
Only adjust the digital volumes, nothing else.
DOWNLOAD SECTION
Combined channels:
-loud
http://www.mediafire.com/view/f4uvmvj0wr82y97
-normal
http://www.mediafire.com/view/1rgx6jkrwwl8duy
Separated channels:
-loud
http://www.mediafire.com/view/xrvp9gsk4w20262
-normal
http://www.mediafire.com/view/5a7hd861dhbppca
Swapped separated channels:
-loud
http://www.mediafire.com/download/ujbeheq04esk9i7/swapped_rx1.90_rx7.80single.zip
-normal
http://www.mediafire.com/download/awspttlhppdl2za/swapped_rx1.86_rx7.74single.zip
CHANGELOG:
V1
-initial release
V1.1
-combined left and right channel on both speakers
-little clearer bass
-Earpiece slightly boost
V1.2
-multiple versions
V1.3
-added swapped channel versions at request of @smartypants88
Bugs: not working for 900H (not yet, if someone provide me correct files for it i will try)
CREDITS: @monivan for making this for XZ, without him you wouldn't have this by now @dontbelive for finding this on Z1, without him monivan didn't bring this to XZ @Sony @samsung for the wonderful mixer_paths.xml
@my girlfriend for testing on her brandnew gold S5 xD
Well done! Good luck, dude! Keep it up!
G900H Compatible?
Mediafire not available
gyxter said:
Mediafire not available
Click to expand...
Click to collapse
You have to request desktop page in your browser, as stated in OP
Salim.Keady said:
G900H Compatible?
Click to expand...
Click to collapse
Try it yourself, just make backup before as I described.
If not work, send me your mixer_paths.xml :thumbup:
Works on AOSP 4.4.4. Running on Nameless ROM right now and it sounds beautiful.
androidfilesharing said:
Works on AOSP 4.4.4. Running on Nameless ROM right now and it sounds beautiful.
Click to expand...
Click to collapse
Yeah I'm glad you're enjoying it! :thumbup:
Will this MOD damage or have any ill effects on the ear piece?
thuglifesk said:
Will this MOD damage or have any ill effects on the ear piece?
Click to expand...
Click to collapse
I have tested volume's on my wife's g900f and I think all variants have same earpiece.
If you're unsure, you can set your volume to minimum before installing this mod, and when installed slightly increase volume and see it yourself.
It will not bang your earpiece immediately, IF volume is to loud on yours you will be warned by hearing distortion.
langeveld024 said:
I have tested volume's on my wife's g900f and I think all variants have same earpiece.
If you're unsure, you can set your volume to minimum before installing this mod, and when installed slightly increase volume and see it yourself.
It will not bang your earpiece immediately, IF volume is to loud on yours you will be warned by hearing distortion.
Click to expand...
Click to collapse
[edit]I've just seen the file is downloaded 181 times so I think everybody is happy
langeveld024 said:
I have tested volume's on my wife's g900f and I think all variants have same earpiece.
If you're unsure, you can set your volume to minimum before installing this mod, and when installed slightly increase volume and see it yourself.
It will not bang your earpiece immediately, IF volume is to loud on yours you will be warned by hearing distortion.
Click to expand...
Click to collapse
Ive noticed for music and ringtones its amazing. However, I hear distortion for notification sounds for some reason. Doesn't make sense though? Has anyone else experienced this?
So, does this actually use both speakers to play sounds?
koragg97 said:
So, does this actually use both speakers to play sounds?
Click to expand...
Click to collapse
Yes
thuglifesk said:
Ive noticed for music and ringtones its amazing. However, I hear distortion for notification sounds for some reason. Doesn't make sense though? Has anyone else experienced this?
Click to expand...
Click to collapse
Did you try another notification sound? Do you use v4a or something?
Do you use any volume mod?
Also, you can try lowering ring volume a step and let me know if it still persist.
hey even i did try the mod there is an improvement in sound quality but the base is still not clear as of sony devices...and really I would appreciate your efforts
sumedh123 said:
hey even i did try the mod there is an improvement in sound quality but the base is still not clear as of sony devices...and really I would appreciate your efforts
Click to expand...
Click to collapse
I can make another version with an filter for which may or may not improve it.
Anyway I'm owning an Z myself and I'd tested this mod on my wife's s5 but when compared I think s5 has much clearer bass than the Z.
Do you use any equaliser setting or other audio mod?
If so, make them undone and test again :thumbup:
This is great sir. Very impressed. The sound is fabulous.
Thank you.
Sent from my kick butt GoldenEye flashed SM-G900W8 using XDA Premium HD app
Your mode is ok but not enought , also you can try mine
Download http://speedy.sh/s5UeR/mixer-paths.xml
ManDone.vRs said:
Your mode is ok but not enought , also you can try mine
Download http://speedy.sh/s5UeR/mixer-paths.xml
Click to expand...
Click to collapse
What is in it? I see only some code from the site you shared when click slow download.
Only 30kb file.
Can you upload to another site perhaps?
New version is up, lemme know what you think guys!
I am not getting the desired output. Please correct me where I am wrong. This is my Manifest file.
<activity
android:name=".Main2Activity"
android:label="@String/app_name"
android:theme="@Style/AppTheme.NoActionBar">
android:screenOrientation="Landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Thanks
According to the Android docs, it is "android:screenOrientation="landscape" - so better avoid the uppercase "L".
This attribute is not enough to keep your app in landscape mode. You need to prevent the system from rotating your view. You need to indicate that your activity will handle screen rotation by itself. Add
android:configChanges="orientation|screenSize"
to <activity>.
See the docs at https://developer.android.com/guide/topics/manifest/activity-element.html#config .
Balanced stereo sound and stereo record with true left/right channel recording
Most stereo modifications do not take into account the lower volume of the conversation speaker, which is why the sound when playing in a polyphonic speaker is much louder. I corrected the gain values, for a more equal sense of loudness. This is especially noticeable when watching movies with a small number of low frequencies.
When you hold the smartphone with the buttons up, the recording of the channels is in the correct position. All the modifications, that I came across earlier, wrote a sound in an inverted position, because of the inverted position of our camera.
Installing:
Download attached file, and flash it throw TWRP
Or you can use magisk module from this post https://forum.xda-developers.com/showpost.php?p=76085341&postcount=4
With best wishes, AlexUnderKH
UPD:
Corrected the position of the channels during playback. It seems that now it sounds right. Files are updated
I edited a magisk module from other thread with sound modification and replaced with your modification. Works. If you allow to upload it here.
Edit: Also edited the module prop file with the whole info of the thread. The magisk module works, I'm waiting when you give permission to upload the magisk module there.
zurik said:
I edited a magisk module from other thread with sound modification and replaced with your modification. Works. If you allow to upload it here.
Edit: Also edited the module prop file with the whole info of the thread. The magisk module works, I'm waiting when you give permission to upload the magisk module there.
Click to expand...
Click to collapse
Of course you can upload module.
Magisk Module of Stereo sound & stereorecord patch:
EDIT: Edited config sh file with the mod name. (The script title when You flash the module on Magisk Manager)
Can i flash this over the old one?? Or i need to go back to stock?
Sent from my Nexus 5X using XDA Labs
good work!
AntonPanos said:
Can i flash this over the old one?? Or i need to go back to stock?
Sent from my Nexus 5X using XDA Labs
Click to expand...
Click to collapse
Yes, you can.
zurik said:
I edited a magisk module from other thread with sound modification and replaced with your modification. Works. If you allow to upload it here.
Edit: Also edited the module prop file with the whole info of the thread. The magisk module works, I'm waiting when you give permission to upload the magisk module there.
Click to expand...
Click to collapse
Thank you both for this awesome mod - completely overhauls the sound.
First off, you should credit the persons whose original work you've used for this mod, namely chdloc for the stereo recording and sshafranko whose stereo surround sound mod you seem to have based your files on. I can see that you've changed some of the digital volume gains (and added a frequenzy cutoff), but you seem to have boosted it for the headphones too quite a bit. I cannot however see that you've made any changes to the stereo recording compared to the original other than boosting the recording volumes. You have changed the lines
Code:
<!-- Incall Recording -->
<ctl name="MultiMedia1 Mixer VOC_REC_UL" value="1" />
<ctl name="MultiMedia1 Mixer VOC_REC_DL" value="1" />
<ctl name="MultiMedia8 Mixer VOC_REC_UL" value="1" />
<ctl name="MultiMedia8 Mixer VOC_REC_DL" value="1" />
<!-- Incall Recording End -->
from 0 to 1, but as far as I can tell, that doesn't have anything to do with the stereo recording. In fact, with the original mod my channels are already in the correct position when recording with the buttons on top. You also haven't increased the bitrate for the audio recorded so you're getting a quite low bitrate per each channel.
Mhm … If I put my N5X to the left, so the buttons are on the upper side the playback channels are reversed like in all other stereo mods before. Left channel sound comes out of the bottom speaker, right channel out of the upper one. Back to DualMonoV2 for me.
CazeW said:
First off, you should credit the persons whose original work you've used for this mod, namely chdloc for the stereo recording and sshafranko whose stereo surround sound mod you seem to have based your files on. I can see that you've changed some of the digital volume gains (and added a frequenzy cutoff), but you seem to have boosted it for the headphones too quite a bit. I cannot however see that you've made any changes to the stereo recording compared to the original other than boosting the recording volumes. You have changed the lines
Code:
<!-- Incall Recording -->
<ctl name="MultiMedia1 Mixer VOC_REC_UL" value="1" />
<ctl name="MultiMedia1 Mixer VOC_REC_DL" value="1" />
<ctl name="MultiMedia8 Mixer VOC_REC_UL" value="1" />
<ctl name="MultiMedia8 Mixer VOC_REC_DL" value="1" />
<!-- Incall Recording End -->
from 0 to 1, but as far as I can tell, that doesn't have anything to do with the stereo recording. In fact, with the original mod my channels are already in the correct position when recording with the buttons on top. You also haven't increased the bitrate for the audio recorded so you're getting a quite low bitrate per each channel.
Click to expand...
Click to collapse
You can use any mods, that you want - it's not my business. So where i took files - not your business. All files, that i used, included in official firmware for Nexus 5X
I did not upload them from XDA. So, you can tell me anything, but in first post i sad, what i did personally.
AlexUnderKH said:
You can use any mods, that you want - it's not my business. So where i took files - not your business. All files, that i used, included in official firmware for Nexus 5X
I did not upload them from XDA. So, you can tell me anything, but in first post i sad, what i did personally.
Click to expand...
Click to collapse
When you base your modifications on someone elses original work, you should always credit them.
j-a-d-z said:
Mhm … If I put my N5X to the left, so the buttons are on the upper side the playback channels are reversed like in all other stereo mods before. Left channel sound comes out of the bottom speaker, right channel out of the upper one. Back to DualMonoV2 for me.
Click to expand...
Click to collapse
I made this modifications to faithfully play the video on other devices, at the request of one of the owners of Nexus 5X, and not to view the videos on the smartphone.
If you do not like it, do not use it.
CazeW said:
When you base your modifications on someone elses original work, you should always credit them.
Click to expand...
Click to collapse
I don't know, who did this mod first time... So I can not credit anyone. I did not upload original files from xda...
CazeW said:
When you base your modifications on someone elses original work, you should always credit them.
Click to expand...
Click to collapse
I changed only mixer_path, not media_profiles
AlexUnderKH said:
I don't know, who did this mod first time... So I can not credit anyone. I did not upload original files from xda...
Click to expand...
Click to collapse
Your code
Code:
<path name="camcorder-stereo">
<ctl name="AIF1_CAP Mixer SLIM TX7" value="1" />
<ctl name="AIF1_CAP Mixer SLIM TX8" value="1" />
<ctl name="SLIM TX8 MUX" value="DEC7" />
<ctl name="DEC7 MUX" value="DMIC1" />
<ctl name="SLIM TX7 MUX" value="DEC10" />
<ctl name="DEC10 MUX" value="DMIC3" />
<ctl name="SLIM_0_TX Channels" value="Two" />
<ctl name="DEC7 Volume" value="84" />
<ctl name="DEC10 Volume" value="84" />
</path>
is the same as the code by chdloc (whom I mentioned in my first post) except for slightly different order and volume. You also mentioned that all the other modifications you had come across wrote the sound in inverted position so you must have seen it then as he's the only person who's done it (and you're still using the same positions as he is). But anyways, I don't want to argue. If you did do it all by yourself and didn't copy anything from anyone else, then good job. :good:
CazeW said:
Your code
Code:
<path name="camcorder-stereo">
<ctl name="AIF1_CAP Mixer SLIM TX7" value="1" />
<ctl name="AIF1_CAP Mixer SLIM TX8" value="1" />
<ctl name="SLIM TX8 MUX" value="DEC7" />
<ctl name="DEC7 MUX" value="DMIC1" />
<ctl name="SLIM TX7 MUX" value="DEC10" />
<ctl name="DEC10 MUX" value="DMIC3" />
<ctl name="SLIM_0_TX Channels" value="Two" />
<ctl name="DEC7 Volume" value="84" />
<ctl name="DEC10 Volume" value="84" />
</path>
is the same as the code by chdloc (whom I mentioned in my first post) except for slightly different order and volume. You also mentioned that all the other modifications you had come across wrote the sound in inverted position so you must have seen it then as he's the only person who's done it (and you're still using the same positions as he is). But anyways, I don't want to argue. If you did do it all by yourself and didn't copy anything from anyone else, then good job. :good:
Click to expand...
Click to collapse
It is possible that initially the file was made exactly by those you are talking about, but 100% I can not know about it And what exactly did it myself - i wrote in the first post
path name "speaker-gain-default" can be remove from mixer_paths.xml
this path never used as I see
thanks for this patch!
btw, you can use "Multi-quote" to reply those posts
This patch is pretty sweet Thanks!
j-a-d-z said:
Mhm … If I put my N5X to the left, so the buttons are on the upper side the playback channels are reversed like in all other stereo mods before. Left channel sound comes out of the bottom speaker, right channel out of the upper one. Back to DualMonoV2 for me.
Click to expand...
Click to collapse
same problem over here.
Is there an Nexus 5X speaker mod with real division of left and right audio channel for the upper and the lower speaker?
If you need to redirect a user from a quick app to an Android app, perform the following:
Add the external schema to activity of the target Android app. The sample code is as follows:
Code:
<activity
android:label="@7F070043"
android:name="com.huawei.phoneservice.HelpCenterActivity"
android:exported="true"
android:excludeFromRecents="true"
android:launchMode="2"
android:configChanges="0x40002D84">
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"> </category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:scheme="hwphoneservice" android:host="externalapp"></data>
</intent-filter>
</activity>
2. In the quick app, call the system.router.push API to pass the configured schema to the router.push API.
JavaScript:
router.push({uri:"hwphoneservice://externalapp/service"})
You can refer to the following document to check details about how to use the push API of the quick app:
https://developer.huawei.com/consumer/en/doc/development/quickApp-References/quickapp-api-router
Can I send some data to the quick app?
Basavaraj.navi said:
Can I send some data to the quick app?
Click to expand...
Click to collapse
You mean where to send data to the quick app?