# Fm Radio From Miui4Dx (Can It Be Added)



## tharris297 (Jun 26, 2011)

Is it possible to add the FM radio from MIUI DefX to CM4DX? I know that CM7 and MIUI have a similar, if not the same base.


----------



## vthoge (Jul 24, 2011)

I hope so!

Sent from my DROIDX using Tapatalk


----------



## SaurusX (Jun 15, 2011)

I've tried bringing it over via four different ways, but couldn't ever get it to install properly. I'm no dev, though.


----------



## ro6666lt (Sep 2, 2011)

Moved to DX general. The development subforum is reserved for releases. Thanks.


----------



## strikeir13 (Jun 7, 2011)

I modified the FM.apk from MIUI so it now installs on CM, but it still force closes on opening (with headphones inserted). It's a start, but I need some more dev help looking at the logcat to understand why. If I had to guess, it's probably something to do with the MIUI framework and appearance vs the CM framework and appearance (layout issues in the log).

It's a start, but it may not be worth pursuing. I'm also looking into the Moto FM radio from GB, we'll see if that works out any better...

(I would attach the file but apparently the ~500k is too large... so have the logcats instead!)


----------



## SaurusX (Jun 15, 2011)

There's an FM radio app in the Market (not Spirit FM Radio) that has obviously been lifted from the stock Motorola app, but is being charged $2 for. Regardless of that, does anyone know if it works on CM4DXGB?


----------



## strikeir13 (Jun 7, 2011)

SaurusX said:


> There's an FM radio app in the Market (not Spirit FM Radio) that has obviously been lifted from the stock Motorola app, but is being charged $2 for. Regardless of that, does anyone know if it works on CM4DXGB?


It works but only intermittently and not very well. I've tried it and had bad results, but others have had better luck. YMMV.

Sent from my CM7 DROIDX.


----------



## Bentotbox (Jun 15, 2011)

strikeir13 said:


> I modified the FM.apk from MIUI so it now installs on CM, but it still force closes on opening (with headphones inserted). It's a start, but I need some more dev help looking at the logcat to understand why. If I had to guess, it's probably something to do with the MIUI framework and appearance vs the CM framework and appearance (layout issues in the log).
> 
> It's a start, but it may not be worth pursuing. I'm also looking into the Moto FM radio from GB, we'll see if that works out any better...
> 
> (I would attach the file but apparently the ~500k is too large... so have the logcats instead!)


The logcat says it can't inflate the layout.

E/ActivityThread( 3612): android.view.InflateException: You must specifiy a valid layout reference. The layout ID @layout/station_list is not valid.

You must have modified it incorrectly.


----------



## strikeir13 (Jun 7, 2011)

Bentotbox said:


> The logcat says it can't inflate the layout.
> 
> E/ActivityThread( 3612): android.view.InflateException: You must specifiy a valid layout reference. The layout ID @layout/station_list is not valid.
> 
> You must have modified it incorrectly.


All I did to the apk was decompile it, edit the AndroidManifest.xml to remove the sharedUserID so the apk would install on CM, then recompile it. I didn't touch the layout files at all, so that's why I think it must have something to do with the lack of MIUI, framework, etc. I would love to have an app dev take a look at it...

Sent from my CM7 DROIDX.


----------



## mikereid (Nov 9, 2011)

I've taken a peak at the MIUI FM app for DX. There are Motorola binaries and libraries for FM on this ROM.

The binaries are: fmradio and fmradioserver, and the libraries: libfmradio_jni.so, libfmradioplayer.so and libFMRadio.so. Probably other dependencies.

Is my app (Spirit) not working ? Some people have reception strength issues. I think there might be a software antenna switch.


----------



## strikeir13 (Jun 7, 2011)

mikereid said:


> I've taken a peak at the MIUI FM app for DX. There are Motorola binaries and libraries for FM on this ROM.
> 
> The binaries are: fmradio and fmradioserver, and the libraries: libfmradio_jni.so, libfmradioplayer.so and libFMRadio.so. Probably other dependencies.
> 
> Is my app (Spirit) not working ? Some people have reception strength issues. I think there might be a software antenna switch.


I just tried your app again, with headphones inserted, and reception was not great, and in an area that the Moto FM Radio never had trouble. I tried CM settings and both Moto settings, but no difference. FWIW, I'm going to keep trying on the MIUI radio.

Sent from my CM7 DROIDX.


----------



## mikereid (Nov 9, 2011)

strikeir13 said:


> I just tried your app again, with headphones inserted, and reception was not great, and in an area that the Moto FM Radio never had trouble. I tried CM settings and both Moto settings, but no difference. FWIW, I'm going to keep trying on the MIUI radio.


Well, FWIW, I'm going to keep trying to get my app running better.









I tried installing the MIUI app with no luck, even on Galaxy S MIUI. On my HTC Legend it hangs, and on the other 3 it gives the error "INSTALL_PARSE_FAILED_NO_CERTIFICATES". which is why I presume you decompiled and recompiled.


----------



## Yar (Aug 30, 2011)

I would love to use Spirit as well, but I get only static when Blur would get tons of stations.


----------

