Andorid on Beagle : how to set dns server using setprop

by David Turner » Thu, 12 Mar 2009 12:33:27 GMT


Sponsored Links
 net.eth0.dns1 is deprecated, the properties you're looking for are:

net.dns1
net.dns2
...






--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Other Threads

1. audio record, playback working on emulator not on device

Hello,
         I am facing some issues with a sample code which works on
emulator but not on an android device. The sample code does voice
recording and then plays the same. On emulator it works fine, though
there is some delay / gap in speaking and playing. But on the device
the only thing I could hear is loud noise but not my voice.

The app has two threads, one for the UI and the other for record and
playback. Please note that the record and playback are in the same
thread.

Also I see

The code looks something like as shown below. Any suggestions about
why there is a difference in playback on emulator vs device?

Thanks in advance,
Divkis

-----------------------------------------------------------------------------
nativeSampleRate = 8000;

AudioManager am = (AudioManager)
getSystemService(Context.AUDIO_SERVICE);

int actualBufferSize = 4096*8;
int capacity = 0;

int bufferSize =      AudioTrack.getMinBufferSize(nativeSampleRate,
                        AudioFormat.CHANNEL_CONFIGURATION_MONO,
                        AudioFormat.ENCODING_PCM_16BIT);


AudioTrack atrack = new AudioTrack( AudioManager.STREAM_MUSIC,
                     nativeSampleRate,
                     AudioFormat.CHANNEL_CONFIGURATION_MONO,
                     AudioFormat.ENCODING_PCM_16BIT,
                     actualBufferSize,
                     AudioTrack.MODE_STREAM);

                capacity = AudioRecord.getMinBufferSize(nativeSampleRate,
                        AudioFormat.CHANNEL_CONFIGURATION_MONO,
                       AudioFormat.ENCODING_PCM_16BIT);


                byte[] buffer = new byte[actualBufferSize];

AudioRecord arec = new AudioRecord(MediaRecorder.AudioSource.MIC,
                        nativeSampleRate,
                        AudioFormat.CHANNEL_CONFIGURATION_MONO,
                        AudioFormat.ENCODING_PCM_16BIT,
                        actualBufferSize);

                am.setRouting(AudioManager.MODE_NORMAL,
                                        AudioManager.ROUTE_EARPIECE,
                                        AudioManager.ROUTE_ALL);
                am.setSpeakerphoneOn(true);
                am.setMicrophoneMute(false);


                Log.d("SPEAKERPHONE", "Is speakerphoneon? : " +
am.isSpeakerphoneOn());

                atrack.setPlaybackRate(nativeSampleRate);
                arec.startRecording();
                atrack.play();

                while(true == isRecording)
                {
                        int readSize = arec.read(buffer, 0, 320);
                        Log.v("Number of bytes read is ", " " + readSize);

                        int retVal = atrack.write(buffer, 0, readSize);
                }

                arec.stop();
                atrack.stop();
            }

-- 

2. What's his name?

Hello,

I have a simple question.

What's his name?
http://www.android.com/intl/ja/media/android_vector.jpg

According to this site, his name is [ android robot ]
http://www.android.com/branding.html

And according to this site, his name is [ Droid ]
http://www.android.com/intl/ja/media/goodies.html

Or some japanese sites said, his name is [ Goodies ]

Which is correct?

-- 

3. Serial over Bluetooth

4. How to implement asking questions before uninstalling the apk

5. How to implement asking questions before uninstalling the apk

6. FileNotFoundException on FileOutputStream when writing on sdcard, no idea why

7. FileNotFoundException on FileOutputStream when writing on sdcard, no idea why