Android File Upload (PHP)

by Bobbie » Sat, 14 Mar 2009 13:35:43 GMT


Sponsored Links
 I have looked literally everywhere I could find and cannot find a file
upload script (that will allow me to upload pictures, audio files and
video files) that works.  Could someone post a *current* and *working*
example for both the Android and PHP code?  Every example I have found
on the web are "older" examples and when I try to copy/paste and
modify them, my app just crashes or it just plain doesn't work.
Please get me some info.
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. How can I use the VideoView in the class that extends view?

Hello.

Actually I want to use the VideoView in the class that is extends
view.
But whenever I tried, the space is allocated but anything is appeared.
SO I've changed the background color, then I can see the how much the
view's area is allocated.
but inside is nothing in there.
and next trying is I overrided the onDraw().
and inside the onDraw() I insert the 'videoView.draw(canvas)' like
this.
but it also not work.
is there any way that I can use the videoview inside the class
extended view?

Thanks for reading.

emca.

-- 

2. AudioRecord.read keep blocking, How to get buffer data and no wait with AudioRecord.read?

I just want get the audio input data, and draw a wave, but now I don't
know how to get audio data.

This is my code:

package com.fugui.fetal;

import java.nio.ByteBuffer;
import java.nio.ShortBuffer;

import android.app.Activity;
import android.content.Context;
import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioRecord;
import android.media.MediaRecorder;
import android.media.AudioRecord.OnRecordPositionUpdateListener;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class Main extends Activity {
        private final static int SAMPLE_RATE_IN_HZ = 8000;
private final static int BUFFER_SIZE = 20 * SAMPLE_RATE_IN_HZ;
        AudioRecord audioRecord;

        @Override
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.main);

                Button button = (Button) findViewById(R.id.Button01);

                button.setOnClickListener(new OnClickListener() {

                        public void onClick(View v) {
                                if (audioRecord.getRecordingState() ==
AudioRecord.RECORDSTATE_RECORDING) {
                                        audioRecord.stop();
                                        ((Button) v).setText("Start");
                                } else {
                                        
audioRecord.setRecordPositionUpdateListener(new
OnRecordPositionUpdateListener() {

                                                public void 
onMarkerReached(AudioRecord recorder) {
                                                        Log.i( "Hill" , 
"onMarkerReached") ;
                                                        recordParse();
                                                }

                                                public void 
onPeriodicNotification(AudioRecord recorder) {
                                                        Log.i( "Hill", 
"onPeriodicNotification" );
                                                        recordParse();
                                                }
                                        });
                                        Log.i("Hill",  
"setPositionNotificationPeriod Result: " +
audioRecord.setPositionNotificationPeriod(1000) );
                                        //Log.i("Hill",  
"setNotificationMarkerPosition Result: " +
audioRecord.setNotificationMarkerPosition(8000) );


                                        audioRecord.startRecording();
                                        ((Button) v).setText("Stop");

                                        recordParse();
                                }
                        }
                });

                init();

                if( audioRecord.getState() != AudioRecord.STATE_INITIALIZED )
                {
                        button.setEnabled( false );
                        ((TextView) findViewById(R.id.TextOut)).setText( "Audio 
Init
Failed.");
                }
        }

        public void init() {
                audioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC,
SAMPLE_RATE_IN_HZ,
                                                AudioFormat.CHANNEL_IN_MONO, 
AudioFormat.ENCODING_PCM_16BIT,
BUFFER_SIZE);

        }

        public void recordParse() {

                short buffer[] = new short[8000 ];

                ((TextView) findViewById(R.id.TextOut)).setText( "Size: " +
audioRecord.read( buffer, 0, buffer.length ) + " Time:" +
System.currentTimeMillis() );
        }
}

-- 

3. Custom RatingBar

4. MP3 streaming seeking problem...

5. Developnnet issues

6. The package name of your apk may not begin with any of the following values

7. Internal Attachments in Gmail App