yashsingh1/xdaforums huggingface dataset:
[LG Optimus 3D] defcomg:
i think you must call SU

something like this

public void RunAsRoot(String[] cmds) {
Process p = null;
ArrayList tmpCmd = new ArrayList();
tmpCmd.add("tinymix 6 120");
tmpCmd.add("tinymix 66 7");
tmpCmd.add("tinymix 67 8");
tmpCmd.add("tinymix 73 2");
tmpCmd.add("tinymix 74 2");
try {
p = Runtime.getRuntime().exec("su");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
DataOutputStream os = new DataOutputStream(p.getOutputStream());
for (String tmpCmd : cmds) {
try {
os.writeBytes(tmpCmd+"\n");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
try {
os.writeBytes("exit\n");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
os.flush();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
[LG Optimus 3D] defcomg:
turn off touch sounds
[LG Optimus 3D] ilie321:
yes true i use it and i deleted after and forgot i told you in new in android :)

i will try today when i go home or you can do it and release a new version if you want

---------- Post added at 05:44 AM ---------- Previous post was at 05:43 AM ----------

nice i will try after i go home from work :D

---------- Post added at 06:07 AM ---------- Previous post was at 05:44 AM ----------

spirit fm has the option to suppress system sounds maybe it works
[LG Optimus 3D] Dambo:
installed but not running. At the end of the message "No Able to seek up!"

Does it in the list of applications, so it can not be uninstalled.
[LG Optimus 3D] lord death angel:
someone can write all step???
[LG Optimus 3D] ilie321:
you need to delete files manually from system/apps

you need to be on ics stock on p920 to work

try to run in smanager console : ls /dev/ check if radio0 file exist

if yes try to run

su

chmod 777 /dev/radio0

try also spiritfm and see if it can tune

---------- Post added at 09:45 AM ---------- Previous post was at 09:33 AM ----------

you need to be on ics stock on p920 to work

flash in recovery the zip from first post (1.1 version)

install spirit fm also to have an test alternative

go in Smanager settings -- console-- run shell and type : ls /dev/ (press enter)

----- check if radio0 file exist

if yes type in same console:

su (press enter)

chmod 777 /dev/radio0 (press enter)

check if app starts

if yes

go in first post and create script icon for enable audio

or to test only in same console from smanager

type: tinymix 6 120 (press enter)

tinymix 66 5 (press enter)

tinymix 67 5 (press enter)

tinymix 73 2 (press enter) you should hear sound in left or right headset

tinymix 74 2 (press enter) you should hear sound in left and right headset

for spiritfm

start it and it should tune correctly

go to audio settings select source to none (last option)

go in first post and create script icon for enable audio

or to test only in same console from smanager

type: tinymix 6 120 (press enter)

tinymix 66 5 (press enter)

tinymix 67 5 (press enter)

tinymix 73 2 (press enter) you should hear sound in left or right headset

tinymix 74 2 (press enter) you should hear sound in left and right headset

soon we hope to be much easier just to flash the zip in recovery and done but we need time
[LG Optimus 3D] Dambo:
Thanks for your reply.

I am currently at Darkroom International V3 XXL

File radio0 exist

There are 777 law, still the same error
[LG Optimus 3D] nikomedes:
i dont know what the problem is but after installing v1.1 zip there are some missing components. when i checked the file some file not installed such as enable and disable scripts, smanager, some files from ti connectivity , and permissions.

and please do not suggest to re install the zip. ihave already tried this several times.
[LG Optimus 3D] chieutim:
Re: [FM Radio][JB][ICS][V1]
[LG Optimus 3D] defcomg:
for now that should route audio to speaker

echo "Routing To Speaker"
tinymix "66" "7"
tinymix "68" "28"
tinymix "75" "2"
tinymix "76" "2"
[LG Optimus 3D] ilie321:
setDeviceConnectionState(int 0x2000000, int 1, String DEVICE_IN_FM_RADIO_RX);

setForceUse(int 1, int 2);

setDeviceConnectionState is not used anymore because android.media.AudioSystem library was replaced by android.media.AudioManager

which is called like this

AudioManager mAudioManager = (AudioManager) getSystemService(AUDIO_SERVICE);

mAudioManager.setRouting(int mode,int routes,int mask);

i tried with

mAudioManager.setRouting(mAudioManager.MODE_CURRENT, mAudioManager.ROUTE_HEADSET, 0x2000000);

or

mAudioManager.setRouting(mAudioManager.MODE_CURRENT, mAudioManager.ROUTE_HEADSET, 0x800000);

nothing yet :(
[LG Optimus 3D] defcomg:
well screw it i say we capture audio focus and just use in app shell commands to route audio saw this from another thread maybe we can transplant the methods into that app it look better http://xdaforums.com/showthread.php?t=1795141 src included did you get compiled app to run
[LG Optimus 3D] ilie321:
is this app starting on your phone?
[LG Optimus 3D] defcomg:
Nope we Could replace the Code for seeking power on rds with the code from FmRxapp so it would work with the O3D the FMRxapp is very basic so alot of functions where left out Heard CM10 CM10.1 had an app
[LG Optimus 3D] drastic00:
Re: [FM Radio][JB][ICS][V1]

FYI I could not get mine to tune anything. Got tx and radio apps running but no tuning. FmService is also running. No gui in radio app unless I do chmod (I probably need to add it to the script but have not looked into where).

Sent from my belligerent LG P925 with XBSA vX3D ICS ROM
[LG Optimus 3D] ilie321:
defcomg check this pls and see if audio focus is ok with keys etc

app exit if you call someone or you are called or you start another audio app

i got it directly from eclipse do i need to modify it like align, signing etc when i do that?

FmRxApp.apk
[LG Optimus 3D] defcomg:
nope no focus i see it request root at start but does not route
[LG Optimus 3D] chieutim:
Speaker works very well with loose plug in head phone.

Thanks
[LG Optimus 3D] ilie321:
strange for me it works

i can do anything except calls or another audio app and radio works ok

i compile it for JB any difference? FmRxAppJB.apk

so to understand is no sound at all? or it lose sound at keys press etc?
[LG Optimus 3D] defcomg:
Nope if i run app in background and push Volume + or - ot switches to ringtone Stream and kills FM however if i play a song while radio is running and switch back to FM App it kills music app
[LG Optimus 3D] ilie321:
if i run app in background and press volume keys it adjust the fm playback volume

yea if switching to another stream it kills fm app or fm kill the other one but this is not a big problem i think???no
[LG Optimus 3D] ilie321:
anyone else tested this and had same issue with volume keys when app running in background?
[LG Optimus 3D] chieutim:
I have just tested your FmRxAppJB.apk.No issue with volume keys when app running in background. Volume indicator increase or decrease with + or - keys.

Thanks
[LG Optimus 3D] defcomg:
must be my rom then
[LG Optimus 3D] macckus:
I have instaled aplication from first post, I can't instal FmRxAppJB.apk beacuse appears that it is already installed on the same name. How can i do?
[LG Optimus 3D] ilie321:
go to system/apps and delete the fmrxapp.apk if you want to try the JB version
[LG Optimus 3D] macckus:
ilie321 I have ics 28b so I guess I can't use this version?
[LG Optimus 3D] ilie321:
idk but check this http://xdaforums.com/showpost.php?p=39821037&postcount=128 is for ics v28 stock kernel
[LG Optimus 3D] Vaimaster:
Re: [FM Radio][JB][ICS][V1]

For v30A,is there any change?i mean we do the same thing,e?
[LG Optimus 3D] ilie321:
i didnt installed it but it should be the same think
[LG Optimus 3D] chieutim:
I upgrade to V30A XSBA V8 rom.Fm radio works.
[LG Optimus 3D] ilie321:
With the help of Pesach85 now his kernel for v28b ics is working with radio also

you can download it for here

for installation details his thread is here http://xdaforums.com/showthread.php?t=2047427

Edit:forgot to add i work at a a new GUI for fm app with some improvements in 2-3 days i think is done
[LG Optimus 3D] Vaimaster:
Re: [FM Radio][JB][ICS][V1]

Have you manage to make it easier for noobs like me?if yes,upload the instructions and files.Because I know that it's a matter of time to create a easily working fm radio app...
[LG Optimus 3D] amazing 3D:
+1

Sent from my LG-P920 Stock V30a
[LG Optimus 3D] macckus:
whether the problem with switching wifi and bletooth was already eliminated ?
[LG Optimus 3D] ilie321:
new apk for test

ok i made some changes to the apk for me and you are free to try them :p

the interface is not so nice but sorry im new in this

changes from defcomg 1.1 version:

- new look

- added long click on keys to store station

- added change frequency by clicking on the current frequency from main screen (xxx.xxMhz area)

- changed audio start/stop script no need to use the external scripts for sound

- added route to speaker option on main screen

- added chmod 777..... script inside app

- sound works even if you enter in other app so you can use you phone and listen radio

- app will exit if you open a player or someone call you

known bugs

- at first use or after restart app may not start correctly or may crash. At second try should work (this problem is on my phone at list)

- first start is long let the app around 10secs to connect to phone FM receiver

- starting RDS can OVERLOAD YOUR CPU take care --- you need to force close the "fmservice" from app list in this case;

- sound may start few secs later at launch

to install this flash the zip from first post in recovery

- first you need to be ROOTED

- second you need ics stock kernel or the kernel from precedent posts (didnt tried others)

- go to system/apps and delete fmrxapp.apk with a file explorer like ES file explorer

- install this new apk fmrxapp.apk like a normal app

do not blame me if your phone will be damaged

report bugs pls

I will try to help if i can in case of errors

---------- Post added at 06:57 PM ---------- Previous post was at 06:47 PM ----------

seams not even spirit fm not working if you start wifi idk what to do

the service app that has all the connections with hardware is in c++ :(
[LG Optimus 3D] defcomg:
Will test it
[LG Optimus 3D] Pesach85:
Tested and works!! ;)
[LG Optimus 3D] chieutim:
Your new app works very nice.It is comfortable.I also turn on wifi and it works normally but can not

change to other frequency.I use V30A V8 XBALL Rom.

Thanks.
[LG Optimus 3D] ilie321:
you cant change frequency with wifi on ?
[LG Optimus 3D] chieutim:
Yes,I can not.When Wifi on, turn off the app is slow too.
[LG Optimus 3D] ilie321:
cant do anything maybe a dev that know to work with jni and C++
[LG Optimus 3D] 5ajad:
i deleted the past apk...but the new one cant be installed!

"fmrxapp.apk Not installed"

:-?

Edit: restarted the phone , and it is installed:D

tnx
[LG Optimus 3D] defcomg:
ilie321

Tested it Matter Fact Top Notch Work UI is Tight

Somethings todo

Lock to Potrait

JB still does not capture Audio Focus

add this

to handle calls / Ringtones

OnAudioFocusChangeListener afChangeListener = new OnAudioFocusChangeListener() {
public void onAudioFocusChange(int focusChange) {
if (focusChange == AUDIOFOCUS_LOSS_TRANSIENT
// Pause playback
} else if (focusChange == AudioManager.AUDIOFOCUS_GAIN) {
// Resume playback
} else if (focusChange == AudioManager.AUDIOFOCUS_LOSS) {
am.unregisterMediaButtonEventReceiver(RemoteControlReceiver);
am.abandonAudioFocus(afChangeListener);
// Stop playback
}
}
};

Duck to handle message tone When using Camera

OnAudioFocusChangeListener afChangeListener = new OnAudioFocusChangeListener() {
public void onAudioFocusChange(int focusChange) {
if (focusChange == AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK) {
// Lower the volume
} else if (focusChange == AudioManager.AUDIOFOCUS_GAIN) {
// Raise it back to normal
}
}
};

http://developer.android.com/training/managing-audio/audio-focus.html

Updated Post #2
[LG Optimus 3D] ilie321:
i have it inside code except this line which gived me problems

am.unregisterMediaButtonEventReceiver(RemoteControlReceiver);

who is RemoteControlReceiver in our case???i tried everything

i will try again when i go home and i will post the source also, maybe someone can do improvements

i will add this also

if (focusChange == AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK) {

}
[LG Optimus 3D] defcomg:
lol okay
[LG Optimus 3D] ilie321:
ok this is the code to manage audio focus

did i made something wrong???

...............................................................................................
am = (AudioManager) getSystemService(AUDIO_SERVICE);
int result = am.requestAudioFocus(afChangeListener,
// Use the music stream.
AudioManager.STREAM_MUSIC,
// Request permanent focus.
AudioManager.AUDIOFOCUS_GAIN);

if (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {
if (am.isSpeakerphoneOn()) {am.setSpeakerphoneOn(false);}
sFmRadio.rxSetVolume(DEF_VOLUME);
AudioOn(false);//start headset audio
sFmRadio.rxSetMuteMode_nb(1) ;//unmute

}

}

OnAudioFocusChangeListener afChangeListener = new OnAudioFocusChangeListener() {
public void onAudioFocusChange(int focusChange) {
if (focusChange == AudioManager.AUDIOFOCUS_LOSS_TRANSIENT){
sFmRadio.rxSetMuteMode_nb(0) ; //mute radio
// Pause playback
} else if (focusChange == AudioManager.AUDIOFOCUS_GAIN) {
sFmRadio.rxSetVolume(mVolume);//restore volume
AudioOn(mToggleAudio);sFmRadio.rxSetMuteMode_nb(1) ;//unmute and reaply tinymix just in case
} else if (focusChange == AudioManager.AUDIOFOCUS_LOSS) {
// am.unregisterMediaButtonEventReceiver(RemoteControlReceiver); is for headset keys detection
am.abandonAudioFocus(afChangeListener);//radio will exit so we give backk audio focus to sistem
// Stop playback
}
else if (focusChange == AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK) {
sFmRadio.rxSetVolume(0);//volume to min
}
}
};
[LG Optimus 3D] defcomg:
seems right
[LG Optimus 3D] ilie321:
this is last version compiled for JB maybe it will work

is strange fmrxapp.apk
[LG Optimus 3D] Vaimaster:
Can i use the latest FmRxAppJB for my lg with v30a or it will stuck?
[LG Optimus 3D] ilie321:
should work but no difference from previous file for you

new changes will come in 3-4days maybe
[LG Optimus 3D] Vaimaster:
Ok..this time,the app worked for me.but when i open wi-fi and then close it,the radio stuck in the last radio station..when i go to change it,it stuck the whole mobile so i have to reboot it and then it's fine..Continue the good job and after a while we will have a FULL-working fm radio app.
[LG Optimus 3D] ilie321:
this is a big issue that idk if it will be solved because is not from app is from driver for the wifi/bt/fm chip my opinion

i have this issue not related of radio app if i start wifi first bluetooth dont works until i restart the phone
[LG Optimus 3D] ilie321:
EDIT changed fmrxapp .apk (1 line) so all that downloaded before edit if they want can download it again

the change made faster tune after first try when stating the app

changes in v2.1

- added sweep left or right in main page for options

- added new notification with buttons

- removed old notification

- normally no more force close at first use or after phone restart but it needs more time to tune in so wait 10-15secs first time

- new UI more pleasant (for me at list)

files:

fmservice.apk

FmRxApp2.1.apk

same way to install +

remove the fmservice.apk from system/apps and install the new one as a normal app

Known bugs:

- starting RDS can OVERLOAD YOUR CPU take care --- you need to force close the "fmservice" from app list in this case;

- sound may start few secs later at launch

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

changes in v2.0 from defcomg 1.1 version:

- new look

- added long click on keys to store station

- added change frequency by clicking on the current frequency from main screen (xxx.xxMhz area)

- changed audio start/stop script no need to use the external scripts for sound

- added route to speaker option on main screen

- added chmod 777..... script inside app

- sound works even if you enter in other app so you can use you phone and listen radio

- app will exit if you open a player or someone call you

known bugs

- at first use or after restart app may not start correctly or may crash. At second try should work (this problem is on my phone at list)

- first start is long let the app around 10secs to connect to phone FM receiver

- starting RDS can OVERLOAD YOUR CPU take care --- you need to force close the "fmservice" from app list in this case;

- sound may start few secs later at launch

to install this flash the zip from first post in recovery

- first you need to be ROOTED

- second you need ics stock kernel or the kernel from precedent posts (didnt tried others)

- go to system/apps and delete fmrxapp.apk with a file explorer like ES file explorer

- install this new apk fmrxapp.apk like a normal app

do not blame me if your phone will be damaged

report bugs pls

I will try to help if i can in case of errors
[LG Optimus 3D] Vaimaster:
I have the same bugs...the app open the first time,the sound is great..then,if i open wi-fi,then close it and then restart the app,the app doesn't work..i have to reboot the device to make it work..But,don't worry...Continue the good work...Can't wait to see the next update.. :D:D:D
[LG Optimus 3D] ilie321:
cant do anything for this is the driver for the WIFI/BT/FM chip that is doing this problem
[LG Optimus 3D] jonbubble:
thanks i now have working fm radio running acura v2
[LG Optimus 3D] chieutim:
Pls check your app if it confuses fm antenna and wifi signals input when wifi turn on.Tun on wifi then

bluetooth does not work with my device.It is the same your problem but another apps normally work with wifi on.
[LG Optimus 3D] kirpeace:
Install failed for both apks
[LG Optimus 3D] ilie321:
did you flashed the zip from first post?
[LG Optimus 3D] daniel.mota:
ilie321 and defcomg, can you guys make a step-by-step guide to install this?

Or is it still too early, and more development is still needed?
[LG Optimus 3D] ilie321:
is this not ok?

http://xdaforums.com/showpost.php?p=40323029&postcount=168
[LG Optimus 3D] daveferry:
I can't flash the zip from first post with twrp.. I received an error... (can't flash status 6)
[LG Optimus 3D] daniel.mota:
Well,

I had some doubts when reading:

"same way to install +

remove the fmservice.apk from system/apps and install the new one as a normal app"

Is this the way?

"to install this flash the zip from first post in recovery

- first you need to be ROOTED

- second you need ics stock kernel or the kernel from precedent posts (didnt tried others)

- go to system/apps and delete fmrxapp.apk with a file explorer like ES file explorer

- install this new apk fmrxapp.apk like a normal app"
[LG Optimus 3D] ilie321:
if you install for the first time radio

yes flash the zip in recovery , remove both fmrxapp.apk and fmservice.apk from system/apps

and install those 2 apk i posted as normal apps

if you have flashed the zip from first post

check if you still have fmrxapp.apk and fmservice.apk in system/apps if yes delete them both

and install those 2 apk i posted as normal apps

if you have the v2.0 just delete fmservice.apk from system/apps

and install those 2 apk i posted as normal apps
[LG Optimus 3D] daniel.mota:
Thanks, I'm installing for the first time, I will try it and report back.
[Nexus 4 Q&A, Help & Troubleshooting] xmizer:
My data charges depend on the usage and it's very expensive. Sometimes, somehow my data is accidentally turned on. Is there a fool-proof way to ensure that that never happens? Is there an app that ask me to confirm if I am sure that I want to turn on data?
[Nexus 4 Q&A, Help & Troubleshooting] subxero123:
Go on settings

Press "more"

Go on "mobile networks"

And if data enabled is unmarked that means its off
[Nexus 4 Q&A, Help & Troubleshooting] xmizer:
I don't want to always go through those steps to see if it's off.

And, it doesn't really ensures that it never gets turned on.

Is there another way?
[Nexus 4 Q&A, Help & Troubleshooting] subxero123:
Of course it does, why won't it?

Also if u don't want to go through all those steps u can use widgets

I can just press data enabled and it toggles on/off

Also next time post in the q&a section
[Nexus 4 Q&A, Help & Troubleshooting] iNeedICS:
But if you really really want to make sure pop out your sim and that should work ;) trololol but seriously those widgets work! I used them before :thumbup:
[Nexus 4 Q&A, Help & Troubleshooting] gd6noob:
Airplane mode... haha that will be sure you wont have data charges!!! lol
[Nexus 4 Q&A, Help & Troubleshooting] kishke:
I'm guessing you could make a null APN and simply select it, that way your device shouldn't be able to use data until you choose the right APN.
[Nexus 4 Q&A, Help & Troubleshooting] ashishv:
^^ This will definately work.:)
[Nexus 4 Q&A, Help & Troubleshooting] chef_christoph:
What about using Tasker or Llama to set up an event to disable mobile data if it is on?
[Micromax A110] milinrak:
Can i Root my Micromax Canvas 2 after an official update.

Pls Help
[Micromax A110] chemicalrage:
Yes you can. Flash CWM (using SP tools) and then apply SuperSU package in recovery.
[Micromax A110] Anas6538:
heyy

plz tell step

....

what can i do for it .

:o:o
[Micromax A110] pankycool123:
just first flash the cwm recovery with SP Tool and Then flash the superSU zip.........
[Micromax A110] Anas6538:
mene sab try kara par kuch nahi ho raha he..

when i click on download option ...

but its not work..

doenload hota he nahi he
[Micromax A110] inGen.AD:
steps

Steps:

1.Download cwm recovary .img from original android devolopment section.

2. Replace recovary .img in the rom folder with cwm recovary.img.

3.Load the scatter file and press download

4.Connect the phone.

Note: press download button before connecting the phone.

5.Flash SuperSU
[Micromax A110] Anas6538:
when i connet my phon to pc..

phon switch rakhu k nahi ???
[Micromax A110] inGen.AD:
Off

phon switched off rakho

Keep it swiyched off
[Micromax A110] Anas6538:
how can i downgrade canvas 2 without root ???

plz ans ..

if it is possible...