Get Raw Magstripe Data with audio jack reader [closed] - android

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
So i have recently acquired a few paypal magstripe card readers for free. My goal is to use this to get the raw data via the audio jack on an android device. My best guess at how to do this would be to use the AudioRecord stuff in android, then decode the audio signal. Would this be the best way? Anyone else tackle stuff like this? Examples?

This is not as simple as you might first imagine.
Record Audio. You will have to continuously read audio and place it into a buffer.
Decode Audio, save as 16bit PCM encoded, sampled at 44100hz. You will have to note when zero crossings occur and based on it generate a binary string. Then convert that binary string to ASCII.
Once you are this far you have your track 1 or track 2 data! From here you can follow the ISO 7813 format if you are parsing credit cards. It fairly easy to parse, once you understand the spec.
Check out these resources. Good luck!
AUDIO TO TRACK DATA:
http://www.instructables.com/id/Read-any-magnetic-strip-card-with-a-Square-reader-/
TRACK DATA:
http://en.wikipedia.org/wiki/ISO/IEC_7813
http://www.gae.ucm.es/~padilla/extrawork/tracks.html

Related

Android live audio streaming via RTP over own IP [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
How can I live stream the audio (RTP) of a phone's mic?
I want to serve my stream on my own IP. Like: rtp://my_sream_ip:8080 (by acting as a server).
Actually, I think the possible way is to:
First: Create a server and On click of a button, stream mic's audio to the created server.
Secondly:Then the audio that is being streamed on a url(e.g.: rtp://127.0.0.1:8080) should be streamed in such a way that another APP can live stream audio from that.(receive/play that stream)
I am very sorry for asking such a long question, but I am very much tired for 2 weeks searching everywhere.
Anyone who can provide any code samples/links will be thanked very much!
Its possible but you should have your own AudioStream; to understand it please refer https://audioprograming.wordpress.com/2012/03/03/android-audio-streaming-with-opensl-es-and-the-ndk/
Then you can stream live audio via HTTP, web service etc.
Please inform me about phases.

Compare two audio files in android [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm making an android app in Eclipse and i want to record my voice, which will be password for login into application. When i try to log in it should recognize my password and let me use the application. How can i do that comparison in order to get a match, i need something like shazam? Thanks for any tips!
Audio comparisons is a very complex topic. Generally, if you don't know anything about it, I'd discourage you to head into such a project.
The problem is, that while you could of course just compare the two audio files byte by byte, that certainly is not what you want. Although two audio files sound the same, i.e. it contains the same spoken words, the actual data will differ quite a bit.
You'd have the following possibilities:
Try to recognize what the user said (Speech recognition), and check whether the same word was recognized later. This solution, while being the simplest, could not distinguish between different users.
Dive into the mysterious world of audio processing. A technology called Fast Fourier Transformation is more specifically what you'll be ending up dealing with.

What is the best approach to reduce size of apk by storing resources on the Internet? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have a ringtone application on Google Market which is close to 12Mo in size. I would had more ringtones into it but it will obviously increase the APK size. Actually, the ringtones are MP3 that are in the res/raw folder of my application.
How can I reduce the size of my APK by not storing the sound files (MP3) inside the APK but instead fetching them on the Internet the first time they are requested (and playing locally the subsequent times)?
Is there a best practice, an Android design pattern or library that I can use to help?
downloading ringtones from net is not a bad idea for reducing apk as long as the user doesn't mind it. So you can use it. Besides that you can also consider using AAC instead of mp3. AAC achieves better compression at a given quality, compared to mp3.
you can check this article to know about different techniques of reducing apk size

Android libraray for generatring Waveforms from audio file [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I'm currently developing an android app and need to be able to render a Waveform of an audio file. I already read about the Visualizer class, but I think that class is designed to do realtime calculation. What I want to do is go trough an audio file and generate for example an .PNG that contains a waveform of the whole audio file.
Basically something like soundcloud does:
http://www.djban.com.br/wp-content/uploads/soundcloud-waveform.png
Are there any libraries that can do this? Or can you tell me how I can get an array of amplitudes of an audio file?
I don't know of any library but it should be easy to get it working.
First, in order to get the Amplitude of the wave form, you will need the audio in PCM format.
Assuming that you need the waveform for arbitrary audio files (mp3 in particular), you will need to find a way to convert between formats. A quick google search gives this result.
NOTE: if you just need to do it for audio coming from the microphone, you can avoid the conversion since it delivers audio data in the PCM format.
After getting the samples, you will need to draw their amplitudes somehow. You have several options, but I would give the Canvas a try. You can draw lines (or general shapes) there and then export it to a file or draw it on the screen.
Another option to draw is OpenGL. This is more complicated if you haven't use it before, but it will be probably faster.

Android mp3 analysis [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm making a music player for android and I would like to get the average BPM (maybe also frequencies or tones) of a song BEFORE playing it, so I can show the user some info about the song, I know I probably have to open a stream and apply some maths to it to get the data I need, but I don't know how to act, can anyone help me?
I finally found the solution!
I'm using the Minim java audio library, which can performs offline analysis on the audio buffer :)
http://code.compartmental.net/tools/minim/manual-minim/
You can use the FFT
FFT library in android Sdk
This example may be helpful:
Android audio FFT to retrieve specific frequency magnitude using audiorecord
another one:
Get sound frequency with Android FFT

Categories

Resources