You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
api-impl: add APIs for libGDX games
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package android.hardware;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import android.location.Location;
|
||||
import android.location.LocationListener;
|
||||
import android.location.LocationManager;
|
||||
@@ -44,4 +47,8 @@ public class SensorManager {
|
||||
}
|
||||
|
||||
native void register_accelerometer_listener_native(SensorEventListener listener, Sensor sensor, int sampling_period);
|
||||
|
||||
public List<Sensor> getSensorList(int type) {
|
||||
return Arrays.asList(getDefaultSensor(type));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,12 @@ public class MediaPlayer {
|
||||
public void reset() {}
|
||||
public void release() {}
|
||||
|
||||
public boolean isPlaying() { return false; }
|
||||
|
||||
public void seekTo(int dummy) {}
|
||||
|
||||
public void setVolume(float leftVolume, float rightVolume) {}
|
||||
|
||||
public static native void native_prepare(long gtk_media_stream);
|
||||
public native long native_setDataSource(String path);
|
||||
public static native void native_setOnCompletionListener(long gtk_media_stream, MediaPlayer.OnCompletionListener listener);
|
||||
|
||||
@@ -40,6 +40,18 @@ public class SoundPool {
|
||||
return nativePlay(nativePool, soundID);
|
||||
}
|
||||
|
||||
public void autoResume() {
|
||||
System.out.println("WARNING: SoundPool.autoResume not implemented yet");
|
||||
}
|
||||
|
||||
public void autoPause() {
|
||||
System.out.println("WARNING: SoundPool.autoPause not implemented yet");
|
||||
}
|
||||
|
||||
public void setVolume(int streamType, float leftVolume, float rightVolume) {
|
||||
System.out.println("WARNING: SoundPool.setVolume not implemented yet");
|
||||
}
|
||||
|
||||
public class Builder {
|
||||
public Builder setAudioAttributes(AudioAttributes attributes) {
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user