How to draw sound in android - java

I'm creating an app on android in java, very simple, which has a button that on click play a sound.
I want to create a sort of canvas to draw something like sinusoide of music.. i hope i've been clear..
Do you know something about this?

look at this Api Demp it may help u.

Related

How can I allow the user to draw freely on the screen

how do I can make the user to draw somthing by touch the screen?
in what method I use?
Does I use canvs?
Thanks (:
Yes, you will need to use the HTML canvas object. I recommend also looking into a graphics library to make things more simple. Fabric.js is a good one (http://fabricjs.com).
Here is a global drawing web app I made using node.js. Feel free to check it out.
http://node.paulkr.com
https://github.com/paulkr/pennitdown

How to add custom gesture android studio?

So there is my question. I would like to know how to add custom pattern for a gesture in Android Studio, just like: draw a tick to continue or something like that.
Thanks in advance.
I don't think this is possible as you have to use the MotionEvent enum. An example of how this is done is shown here
You'd have to look at extending this or using movement tracking to work out things like velocity of the motion, there's documentation here but it doesn't look elementary.

manipulate android phone button callback

I am a beginner in programming and I don't know much about it. I was asked to figure out how to "Manipulate an Android smartphone to do the following":
1) Create a button that would generate a callback (for example turn the screen from black to white)
2) Control the hardware of the device (Switch on the camera flash light, switch off the light)
I Would appreciate any help as I don't know what steps I should take to achieve this as I am an absolute beginner.
1)Change background after click
2)How to use camera
But first follow Android training to understand how Activities works

TouchPaint Android API

All I am trying to do is use this API to write on the screen.
I am very new to programming, I can run this code, and play with it, but which class would I need to edit if I wanted to add a save button to it.
Once you draw something you would save it to your phone, how would I do this?
Can you point me to some code please?
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/TouchPaint.html

Explanation of JetBoy example for dev.android.com?

I have developed many applications for desktop or web in java, but never for android.
What little I have practiced with was weird because I am used to SWING. Since it uses .xml files for applications I was wondering if you needed this also in games?
For example there is a a good example at http://developer.android.com/resources/samples/JetBoy/index.html. I was hoping someone could explain two things for me.
How is the image drawn to the screen?
How do you listen for user input? (Eg. Clicks, drawing, swiping, ect...)
I have made games on the desktop so you don't have to get in depth, but I found it hard to understand the code. (What I was suppose to do special for android.)
(Another way to put it:)
I guess basically what I am asking is how to I draw an image that will in turn listen to clicks and such without adding a button? Or do I need to add an invisible button? Then if I did have to add a button how would I listen for swiping and drawing?
Also I saw some methods like doDraw(), but did not see where they were putting the image so it would appear on the android device.
JetBoy is rather complicated for a beginner, check these simple examples which are based on the same principles as JetBoy: How can I use the animation framework inside the canvas?
Everything is done by drawing bitmaps on the view's canvas and an event which detects when and where the sreen was touched.
I think this will tell you everything you need to know, in a comprehensive, 31 part series detailing the creation of Light Racer 3d for Android.
If you are not going to use any Game Engine ,
basically you extend android.view.SurfaceHolder
and then overide these methods,
public boolean onTouchEvent(MotionEvent event)
protected void onDraw(Canvas canvas)
go through
these articles.It teaches everything you need from the scratch

Categories

Resources