007
package com.yamato;
import android.content.*;
import android.app.Activity;
import android.os.Bundle;
import android.media.*;
import java.io.*;
import android.util.Log;
public class AnTemptestActivity extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
AudioManager manager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
if(manager.isWiredHeadsetOn())
{
manager.setWiredHeadsetOn(false);
manager.setSpeakerphoneOn(true);
manager.setRouting(AudioManager.MODE_CURRENT, AudioManager.ROUTE_SPEAKER, AudioManager.ROUTE_ALL);
manager.setMode(AudioManager.MODE_CURRENT);
}
AudioManager aM = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
aM.setMode(AudioManager.MODE_NORMAL);
aM.setBluetoothScoOn(false);
aM.setBluetoothA2dpOn(false);
aM.setWiredHeadsetOn(false);
aM.setSpeakerphoneOn(true);
}
}
登録:
投稿 (Atom)
0 件のコメント:
コメントを投稿