Skip to content

Instantly share code, notes, and snippets.

View surahul's full-sized avatar
🌏
working

RV surahul

🌏
working
View GitHub Profile
@Abdelhady
Abdelhady / DeviceOrientation
Last active October 3, 2024 10:10
A utility class to help get current device orientation, you will need it if you decided to fix the activity's orientation in the manifest :)
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.media.ExifInterface;
/**
* Created by abdelhady on 9/23/14.
*
* to use this class do the following 3 steps in your activity: