Third party replacements for MediaPlayer/MediaRecorder? - android

The built-in classes for working with audio in Android seem less than ideal. To me, they are overly complex to use, yet provide only basic functionality.
However, I don't wish to start a debate about the merits or shortcomings of these classes. I just want to know: are there any libraries to provide alternatives to recording and playing audio in Android? I have not been able to find anything, but perhaps there is something out there.

Vitamio looks pretty good, though I have never use it myself. One of interesting feature they say is support HTTP Live Streaming on Android 2.1+. worth to check it out.

Related

Restricting Inappropriate Videos when Uploading to App

I am creating an app for both iOS and Android. The app allows users to create a profile and upload short videos.
My question is, besides the manual revision of videos, how can I prevent uploads that contain nudity or anything that would usually be considered inappropriate?
Thanks for your suggestions!
If you are talking about recognizing nude images, then I'm very certain that you're out of luck. I don't think that you'll find anyt....wait a minute. I can't actually believe it.
I just went and looked for one to make sure that I was correct in saying that there is no nudity detecting API and voila! I found this:
https://www.mashape.com/rohan/nudity-detection-service#!documentation
Looks like that may be what you need. But in general, nudity detection is...not very easy to say the least. I don't think there is a simple algorithm you could implement. Your best bet is either to use that link that I just gave you, or create a system like YouTube has where offenses are punished fairly severely - things like copyright infringement and nudity result in a ban after just 3 times no questions asked.
I hope that helped. good luck!
To add on to Alex K's answer, there are many nudity detection APIs available on Mashape:
https://www.mashape.com/explore?query=nudity
https://www.mashape.com/explore?query=porn
There are quite a few APIs now available on the Mashape API marketplace for the detection of nudity in images, some still relying on skin tone detection (which has a high % of false positives) as well as newer more complex methods that deliver significantly more accurate results without dependence on skin tone such as Nude Detect.

What advantages cocos2d-android does provide over android 2d

I have seen several posts here about cocos2d-android, so ambition to get more idea on it drag me at coco2ds-android-1 and a good example .
My analysis can not find any significant benefit of using coco2ds instead of usual 2d approach of surfaceView and SurfaceHolder.Callback .
I will be thankful if anybody have expertise over coco2ds-android will guide me about benefits to use it instead of usual gaming approach .
Just by clicking on links starting from the ones in OP, I have came across http://dan.clarke.name/2011/04/how-to-make-a-simple-android-game-with-cocos2d/ - which states the obvious answer you are looking for.
First of all, this is a 2D gaming engine. All of the physics and whatnot effects are just there for you. No need to re-implement from scratch
Secondly, this is actually a port of the iPhone gaming library with the same name - great news if you also plan on porting to iPhone. And thirdly it is open sourced, meaning you can tweak anything accordingly.
I have noticed however that this is a pure java library, so do not expect amazing performance. If performance is critical, google for something NDK based, not SDK based. I could not advise here as gaming is not my thing.

Page Curl Animation on Android with OpenGL-ES

I want to achieve a nice 3D page curl animation in Android. I read some articles and found that nice effect can be achieved by OpenGL-ES so I started to learn OpenGL-ES (I did some of tutorials of OpenGL-ES and am still continuing) but I found it too complex for me to achieve this functionality. Also I got some examples which are available on StackOverflow and on the net, they work but I am not able to understand it, can someone guide me to achieve this functionality?
Based on the question comments I have an answer to this question.
YES, you can do that with OpenGL, BUT you need a deep understanding of math and graphics. This is a lot to learn, this will cost you at least a couple of weeks and it's definitely a hard path to go if you do it only because of this single animation (all of this applies if you don't take code which you probably won't understand and another human being put his whole effort into).
Nevertheless there might a ready to use implementation but unfortunately I can't present you one because I don't know if there's any out there.
Update
You callenged me, so I was eger to know whether there is something out there (because I saw that before and couldn't believe that there isn't a project out there which already does that for you).
And actually I found this question which seems to address the very same issue. And yes, there's someone who published his results here. And I have to admit: I looks awesome. It's also a pure java implementation.
But still: Having some background knowledge about OpenGL would enhance your whole attitude as developer. I'm not saying it's a must because not every one will succeed in OpenGL programming because it's quite hard to learn and implies a lot of math. But I think it's worth it because you will gain some deep understanding of current and all future graphical interfaces.

Is there something in the Android architecture or API that prevents people from creating MP3 players that read embedded lyrics?

When I play certain MP3 files (such as lessons from JapanesePod101.com) on my iPod Touch, lyrics or transcripts that are embedded in the MP3 files are displayed in the media player. The lyrics are, I believe, stored as ID3/ID4 tags in the MP3 metadata.
I find this to be an extremely useful feature, and I believe I'm not alone. Despite that, neither the stock Android media player nor any other media player I've downloaded from the Market seems to support this. I just have not been able to find any way to get feature on my Nexus One.
This feature is important enough to me that I'm considering learning Android development just so I can write a simple media player that displays embedded lyrics or notes. However, the fact that nobody else seems to have done this makes me wonder - is it even possible? Is there something in the Android architecture or APIs that make it difficult or impossible to read and display lyrics information from MP3 files? I'd hate to get deep into the learning process and find out what I'm aiming for can't easily be done. (I mean, if all else fails I assume I could write my own MP3-decoder, but that's more trouble than I'm willing to go through right now).
I've already asked this question on the Android Enthusiasts Stack Exchange Beta Site, but in retrospect I decided it was more of a programming question and decided it was better to ask here.
Yeah, definitely more of a programming question. Just from my brief experience of reading through the ID3 spec, I think it's probably just that decoding ID3 tags is a complete PITA. I'm sure it can be done, as there are MP3 tag editing apps available for Android (whether any support lyrics or not, I do not know).
ID3v2.3 seems to have support for both synchronized and unsynchronized lyrics through the SYLT and USLT frames of the header. I imagine it's just such an underused feature that it isn't worth the effort to most to do so. Purchased MP3s don't carry this information (I've always wondered why not?), so they would have to manually be added (or automatically via a lyric service API, but there's a lot more coding involved with that).
Here is the ID3v2.3 spec if you'd like to look into it further...(abandon hope all ye who enter here)
The problem may be that most people would use the built-in mp3 playback mechanisms, and this may neither support lyric display nor be very easy to keep synchronized with something else doing lyric display.
So it may be that something needs to be written which does it's own mp3 decoding.
Most likely this would want to be done in native code. On the other hand, on android, audio output (and unless you use opengl, video display) pretty much has to be done from java. So you are looking at a fair amount of work to decode data with a native library and then dispatch it for playback and display from java.
So to answer your question - is it possible? Definitely
Is it made easy by the android APIs? - not really
I just added a new feature request that would give Android support for reading USLT in the ID3 tag. This will enable the native and 3rd party music players to display lyrics. If you want this feature, please star the request below, and post your comments.
http://code.google.com/p/android/issues/detail?id=32547

Should I learn Google App Inventor as a supplement to Java for Android

Just curious. I am already a Java android guy but am interested in the new app inventor beta for android.
I was wondering what "real" developers are thinking. A lot of people want to develop an android app but don't really have programming skills. Seems like a lot of apps could be written with app inventor - not sure since I haven't tried it yet.
Hopefully this clears up some things for people that are still just hearing about App Inventor. (Keep in mind App Inventor is extremely beta right now, so all of this is subject to change.)
If you're interested in playing around with some of the features it offers and haven't had the time or interest to get involved with the full Android SDK, then App Inventor is probably a good fit for you.
The interface of App inventor offers some unique features you won't find in the Android SDK and is pretty easy to get the hang of (make sure to look at the shortcuts for the Blocks editor, or it might start to feel tedious real fast). It has live debugging and live edits to both the interface and the supporting logic. That alone cuts down on time and frustration if you aren't quite sure about the proper way to do something yet and is probably my favorite feature of the whole system. New developers will especially find it rewarding to actually see their changes implemented on their phone without waiting for things to compile and run. It is a huge time saver and much easier to get used to than the traditional compile and wait process you face if you are trying to learn things through the SDK.
It is also quite handy if you have been playing around with the Android SDK and simply want to try something new out that App Inventor supports that you haven't had the time or aren't quite sure how to approach yet. So long as you keep things focused on features that App Inventor supports, this can provide valuable insight into understanding a problem by getting your phone doing something you can see and use in a matter of minutes. That's something even seasoned developers are likely to appreciate.
The real problem is more when you start hitting walls. Walls that you simply can't climb. And you quickly realize that the limits of this tool must be understood or you will probably spend a lot of time trying to do something that just isn't currently possible. Sooner or later your going find yourself in this position if you use App Inventor very much.
All coding is graphical.
Look at some of the demos or screen shots of what's available through the Blocks editor if you don't understand what that means. Setting values in those big colorful blocks is as close to code as you will get with App Inventor, for better or worse.
If you have any previous development experience, you are going to find yourself longing for the ability to do some simple coding to supplement what you are doing. Or at least the ability to export your project and pick up where you left off in Java. Sorry, this isn't that kind of tool.
Your only options when you get to this point are to pick up and start all over in code or forget about it, at least until the desired feature gets added to App Inventor (which may be never). That right there likely to irk a good number of people and turn them off to it.
If you are looking at getting into Android development, I see no problem with starting out with App Inventor. It might even save you hours of effort that might otherwise be spent trying to wrap your head around some concepts that are simple to understand when you do them, but a bit confusing if you are building them for the first time.
If you are a seasoned developer, or looking to make money or gain Android experience beyond just the concepts, this isn't your end destination by a long shot. If you are a student that is new to programming, this is probably a good environment with sufficient challenges and room to play around in to keep your interest for a decent amount of projects.
Despite it's current limits, I still see App Inventor as valuable resource to learning new concepts and as a playground for trying out new ideas. It is proving to be an awesome tool for introducing someone to Android development, and would probably do as good a job as you could ask for when introducing someone to programming in general.
I have been playing with it for a bit and my thoughts are that is is great for:
An introduction to programming. It is not something people can pick up and develop great programs with straight away, it does still require a lot of thought and logical thinking, but it doesn't require people to learn the correct code syntax
Prototyping. As it is relatively quick and easy to develop with (and has live debugging on the Android device), it allows you to prototype and see/interact with it in real time
Quick coding. If you want to develop a program quickly, this might be the simplest tool
As the tool develops, it will allow more feature-rich applications (it already allows integration with other back-end programs, etc.). The screen design right now is very basic, but will be improved soon.
Overall, I think that if you know Java for Android, then you will be able to pick up Google App Inventor within an hour and start making some functional apps. You might find it more suitable for building some apps, or you might prefer to stick with your current tools.
For people looking to start programming, I think it is an excellent introduction. They can concentrate on logic and program design, instead of setting up their IDE, code structure and syntax. Plus they will see results as they code.
To answer your question 'Should I learn it'. I would suggest that you play with it for an evening - that is all it will take you to get a good feel of it.
It probably won't make you a better developer, but all knowledge is good, so it can't hurt :)
I plan to play around with it anyway.
The generic answer to any "Should I learn ..." question is usually "Yes, it can't hurt to know things." From a practical standpoint, I would skip it. These sorts of things are usually nice ideas that never catch on. Sure this might be a neat way for non-programmers to build very simple applications and perhaps a real programmer could build a compelling application with it but it looks like if you are a programmer the benefits to using App Inventor don't seem that compelling.
I haven't checked it out, but I think it might be worth a look to help in UI development. Most software engineers are good at really solving problems with software or coming up with cool ideas for apps, but when it comes to UI design we find a lot of obstacles. At least myself, I've always been used to working with UI Designers.
I honestly don't like tools that generate code, (except WSDL to java or java to WSDL) but pretty much anything else I find myself spending more time trying to trouble shoot an issue when it comes up than the time I would've spent writing the app from scratch...
Appinventor is so easy to learn, I would suggest go for both options.
Concentrate most of your time on your main Dev environment and learn AppInventor, in the background, to give yourself a break.
The advantage of Appinventor is you can put together reasonably complex apps
in a relatively short period of time.
It's also pretty forgiving, for example, if you have a numeric variable, you can treat it either as a string, or a numeric value, meaning you can put together
prototypes pretty easily and quickly.
If you want an app putting together, quickly, Appinventor might be the better
option, if you need something more powerful, more control over you UI etc, then
a more sophisticated Dev environment might be called for.
With Appinventor being so easy to use and learn, you're giving yourself more options.
Considering Eclipse seems to introduce errors I can't find and can't remove--even after using Project-Clean, I'm looking forward to any alternative.

Categories

Resources