<commit_before>package com.example.bewegungsmeldermain;

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 * 
 * Author: <NAME> <<EMAIL>>
 * Contributors:
 * 	- <NAME> <<EMAIL>> 
 * 
 * Retourniert ein Event wenn eine Bewegung festgestellt wurde.
 * 
 */

import android.app.Service;
import android.content.Intent;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.IBinder;
import android.widget.Toast;

public class MotionDetectionService extends Service implements SensorEventListener{
	
	 private SensorManager mSensorManager;
     private Sensor mAccelerometer;

	@Override
	public IBinder onBind(Intent intent) {
		// TODO Auto-generated method stub
		return null;
	}

	
	@Override
	public void onCreate() {

		Toast.makeText(this, "MotionDetection Service created", Toast.LENGTH_LONG).show();
		
		// System Service zuweisen
		 mSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE);
         mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE);
		super.onCreate();
	}

	
	@Override
	public void onDestroy() {

		Toast.makeText(this, "MotionDetection: onDestroy", Toast.LENGTH_LONG).show();
		super.onDestroy();
	}

	/* 
	 * @see android.app.Service#onStart(android.content.Intent, int)
	 */
	@Override
	public void onStart(Intent intent, int startId) {
		// TODO Auto-generated method stub
		super.onStart(intent, startId);
	}

	@Override
	public void onAccuracyChanged(Sensor sensor, int accuracy) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void onSensorChanged(SensorEvent event) {
		Toast.makeText(this, "Sensor changed", Toast.LENGTH_SHORT).show();
		
	}

	
}
<commit_msg>Log.d eingepflegt (1. sensortest)<commit_after>package com.example.bewegungsmeldermain;

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 * 
 * Author: <NAME> <<EMAIL>>
 * Contributors:
 * 	- <NAME> <<EMAIL>> 
 * 
 * Retourniert ein Event wenn eine Bewegung festgestellt wurde.
 * 
 */

import android.app.Service;
import android.content.Intent;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.IBinder;
import android.util.Log;
import android.widget.Toast;

public class MotionDetectionService extends Service implements SensorEventListener{
	private static final String TAG = MotionDetectionService.class.getSimpleName();
	 private SensorManager mSensorManager;
     private Sensor mAccelerometer;

     // Wird fuer IPC benoetigt (inter-process communication")
	@Override
	public IBinder onBind(Intent intent) {
		// TODO Auto-generated method stub
		return null;
	}

	
	@Override
	public void onCreate() {

		Log.d(TAG, "created");
		// System Service zuweisen
		 mSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE);
         mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE);
		super.onCreate();
	}

	
	@Override
	public void onDestroy() {

		Log.d(TAG, "destroyed");
		super.onDestroy();
	}

	/* 
	 * @see android.app.Service#onStart(android.content.Intent, int)
	 */
	@Override
	public void onStart(Intent intent, int startId) {
		// TODO Auto-generated method stub
		super.onStart(intent, startId);
	}

	@Override
	public void onAccuracyChanged(Sensor sensor, int accuracy) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void onSensorChanged(SensorEvent event) {
		Log.d(TAG, "Sensor changed");
		//mSensorManager.getOrientation(R., values)
		
	}

	
}

{'fraction_non_alphanumeric': 0.09965466206216082, 'fraction_numerical': 0.002220029600394672, 'mean_word_length': 3.5055555555555555, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3139244', 'n_tokens_mistral': 1348, 'n_tokens_neox': 1240, 'n_words': 317}