Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package start.MonitorUIv1; public class StartInActivityMonitor extends Activity implements SensorEventListener{ /** Called when the activity is first created. */ public SensorManager mSensorManager; public boolean k= false; public float prevX; public float prevY; public float prevZ; public Timer timer; public SoundTimeTask ourSound; public TTS myTts = null; private int warning = 0; private String sendTo; private String Username; public long Duration; String myMessage = "Need Help!"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.frame_animations_layout); mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); mSensorManager.registerListener(this, mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) , SensorManager.SENSOR_DELAY_UI); Bundle extras = getIntent().getExtras(); final String tempDuration = extras.getString("myDuration"); float myDuration = Float.parseFloat(tempDuration); Duration = (long) (myDuration * 60 * 1000); ourSound = new SoundTimeTask(); timer = new Timer(); timer.schedule(ourSound,Duration, Duration); final String tempsendTo = extras.getString("telephoneNumber"); sendTo = tempsendTo; final String tempUsername = extras.getString("Username"); Username = tempUsername; myTts = new TTS(this, ttsInitListener, true); myTts.speak("Creatinggggggggg", 0, null); } @Override public void onAccuracyChanged(Sensor sensor, int accuracy) { // TODO Auto-generated method stub } @Override public void onSensorChanged(SensorEvent event) { Sensor mySensor = event.sensor; if (mySensor.getType() != Sensor.TYPE_ACCELEROMETER) return; if (mySensor.getType() == Sensor.TYPE_ACCELEROMETER){ float x = event.values[0]; float y = event.values[1]; float z = event.values[2]; if(!k){ prevX = x; prevY = y; prevZ = z; k = true; } float value1 = Math.abs(x) - Math.abs(prevX); if (value1 > 0.4){ warning = 0; ourSound.cancel(); ourSound = new SoundTimeTask(); timer.schedule(ourSound,Duration, Duration); } prevX = x; prevY = y; prevZ = z; } } protected void onStop() { mSensorManager.unregisterListener(this); timer.cancel(); super.onStop(); } class SoundTimeTask extends TimerTask implements Runnable{ public void run() { switch (warning) { case 0: myTts.speak("Hello" + Username, 0, null); ImageView imgView = (ImageView)findViewById(R.id.imageView); imgView.setVisibility(View.VISIBLE); imgView.setBackgroundResource(R.drawable.frame_animation); AnimationDrawable frameAnimation = (AnimationDrawable) imgView.getBackground(); if (! frameAnimation.isRunning()) { frameAnimation.start(); } imgView.bringToFront(); break; case 1: myTts.speak(Username + "How are you?", 0, null); break; case 2: myTts.speak("Are you ok?" + Username, 0, null); break; case 3: myTts.speak("Do you require assistance" + Username + "?", 0, null); break; case 4: myTts.speak("Hello" + Username + "please respond and move phone", 0, null); break; case 5: myTts.speak("Please respond by moving phone, next warning will send a SMS message", 0, null); break; case 6: myTts.speak("Sending SMS message to designated contact", 0, null); SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage(sendTo,null,myMessage,null,null); break; } warning++; } } private TTS.InitListener ttsInitListener = new TTS.InitListener() { public void onInit(int version) { } }; }