Android Equalizer for API Level < 9 - android

I'm looking for a way to use an equalizer within my app which does not rely on the
android.media.audiofx package especially android.media.audiofx. Equalizer class because these are only available for api level > 9.
Does anybody know about native libraries which work well under android? I've found mpg123 but it seems that this library is very slow. Or is there even another way to implement an equalizer without native librarys?

I did quite a bit of research on this and found that you would have to likely rewrite the entire AudioTrack library in order to accomplish this.
It would require heavy DSP which would be best accomplished using the NDK, if you really want to do it.
Otherwise, I would just write a wrapper that tells the application which API level you're in, and disable those features.
Here is the abstract I wrote on this problem:
http://isthisonthetest.com/?q=node/12
Hope this helps!
EDIT:
This link has been getting a few hits (and the link was broken), so I redirected it to a blog post I just made with the original text. The URL above should work now.

Related

Can we use EffectFactory Class for lower versions

For my new assignment, I wanted to use some library that can provide a "Posterize effect". I found many library like Aviary SDK and jhlabs, Yes, these are easy to use, but these making the code heavier. SO I keep searching for Android's API itself which can do the similar task. And after a lot of RnD, I finally found one my time saver class EffectsFactory which provides the same as I wanted. I applied it in my assignment also. But the bad thing it was added in API level 14, And my app should be compatible with at least API level 8.
So, My question is,
Can I use EffectsFactory class for lower version? If Yes then How?
Or, If No, Then Do we have any API in Android SDK itself which do similar to effectfactory ?
Please avoid referencing any library or NDK's open cv library.
No, there is not an Android API that will posterize an image below API 14. Even above API 14 EffectsFactory may not work, as it says in the Android documentation:
Some effects may not be available on all platforms, so before creating a certain effect, the application should confirm that the effect is supported on this platform by calling isEffectSupported(String).
However, you could easily make a lightweight solution yourself. Posterization is a simple process. For example, the code behind JHlabs' posterize filter is less than 50 lines (and most of them are sugar). In your shoes, if using a 3rd party library was out of the question, I wouldn't hesitate to write my own.
Edit: If you happen to be posterizing images your app takes from the camera, there is also Camera.Parameters.setColorEffect(), but again this is not supported on all devices, as it says in the documentation:
For example, the application should call getSupportedColorEffects() before calling setColorEffect(String).

is there any lib exists for libspotify 12 for android java?

I want to integrate libspotify as sound/player service and integrate spotify in more then one java applications.
Can anyone suggest me any lib or any code example to get me started?
Disclaimer: I work for Spotify
At the moment, Spotify doesn't have a nice Java wrapper for libspotify, but this is definitely something we are thinking about doing in the future. I can't offer an estimate on when this will be available, so if you are dying to get started writing apps which integrate with Spotify, you should use the natively-compiled libspotify for Android rather than waiting for a Java wrapper.
The current preferred way of doing Android work with libspotify is to use the natively-compiled library which can be found on the libspotify website. You'll have to write your own JNI wrappers around it, which can be a bit tricky, but is definitely not an impossible task. :) Unfortunately the documentation for using libspotify under Android is a bit lacking. Again, this is something that Spotify is working to improve.
There is a third-party project called jlibspotify which offers a Java wrapper around libspotify. I personally have not used it before, so I can't comment on how good the project is, but if I recall correctly it is based on an older version of libspotify, so you might be better off going the JNI route detailed above.
I noticed that there is also libjahspotify out there, which seems newer than jlibspotify. I haven't tried it though.

What is the best way to add "Tweet" button to a C++ application for Android

I want to add a "Tweet" button to a C++ application without use of heavy libraries and frameworks. The application is portable and runs on Android and Windows.
I am not sure if I understand your setup. If you have implemented a native part of an Android app you can still write some java UI code and call your c++ code from there.
If you want to have a full portable solution though I would render simple button with help of OpenGL.
UPDATE Oh I see what you meant, so this is actually quite simple. For Android many people use Twitter4j which is not that "heavy". You can also implement API calls on your own, see the official docs. Besides, there are a couple of more possibilities on SO with links to some tutorials.
As for portability, it gets a bit trickier. I would stick with twitter API and implement HTTP calls directly. The quickest way to get it done in a portable way is to write a thin wrapper around the socket calls as someone here suggested.
You could also use Boost.Asio or cURL library, but I have not checked them personally. The latter is available for windows and has recently been ported to Android.
Hope that helps!

video call using android

I want to develop a app which uses 3G for video calling where secondary camera will be use for video call.
Is that possible to make video call? If it is possible please give me some reference or tutorial.
you should look for SIP protocol stack in android. There are various open source projects out there. look for SipDroid, IMSDroid is also a good example. And Sip Api is also available in Android after API level 9.
Another one worth looking at is the CSipSimple project. It is using pjsua as SIP library. The video call is developed in a branch of the project.
I have not tested it yet but it seems to work according to an issue. The issue starts getting interesting from comment 27 onwards since after that video calls seem to be working.
Check it out and look into it. It will probably take some time to find your way around the code at first.

How to create equalizer for android

I want to create simple equalizer for android. How can I do it?
Try to find some methods in MediaPlayer class. But all my attempts failed.
Android has built-in qualizer engine, though it isn't located in MediaPlayer class, becouse it's a class itself located in android.media.audioFx package.
http://developer.android.com/reference/android/media/audiofx/Equalizer.html
Simple answer... you can't do it with the framework or with Java (because there is no JMF support in Android). You have to use the NDK and JNI to compile a native library with equalizer support. If you know C/C++ there are plenty of libraries around that will provide this functionality but if you don't know C/C++ or have the means to pay someone that does I would recommend you move on to something else within your means... There are even some working examples for Android, if you look around, that use libmpg123... but libmpg123 only provides an equalizer interface for mp3's. I found that it's pretty buggy in general and compromised the stability of the app in such a way that it would lock up android and I would have to pull the battery to reboot the phone. In addition, there was alot of audio clipping even with the equalizer flatlined. That is my experience...
I hope that below link is useful for you.
https://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/media/AudioFxDemo.html

Categories

Resources