mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 12:56:49 +01:00
androidstudio vs. eclipse :/
This commit is contained in:
parent
8b3b4d0882
commit
f143c9ec54
@ -1,9 +1,5 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBDevice.State;
|
||||
import nodomain.freeyourgadget.gadgetbridge.miband.MiBandSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.pebble.PebbleIoThread;
|
||||
import nodomain.freeyourgadget.gadgetbridge.pebble.PebbleSupport;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.Service;
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
@ -23,6 +19,11 @@ import android.support.v4.content.LocalBroadcastManager;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBDevice.State;
|
||||
import nodomain.freeyourgadget.gadgetbridge.miband.MiBandSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.pebble.PebbleIoThread;
|
||||
import nodomain.freeyourgadget.gadgetbridge.pebble.PebbleSupport;
|
||||
|
||||
public class BluetoothCommunicationService extends Service {
|
||||
public static final String ACTION_START
|
||||
= "nodomain.freeyourgadget.gadgetbride.bluetoothcommunicationservice.action.start";
|
||||
|
@ -18,9 +18,11 @@ import android.widget.AdapterView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.adapter.GBDeviceAdapter;
|
||||
|
||||
public class ControlCenter extends Activity {
|
||||
|
@ -9,6 +9,7 @@ import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import android.util.Log;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.externalevents.K9Receiver;
|
||||
import nodomain.freeyourgadget.gadgetbridge.externalevents.MusicPlaybackReceiver;
|
||||
import nodomain.freeyourgadget.gadgetbridge.externalevents.PhoneCallReceiver;
|
||||
|
@ -5,7 +5,6 @@ import android.os.Bundle;
|
||||
import android.preference.ListPreference;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.preference.PreferenceCategory;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.app.NavUtils;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
|
@ -1,10 +1,5 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.adapter;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBDeviceApp;
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@ -13,6 +8,11 @@ import android.widget.ArrayAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBDeviceApp;
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
|
||||
public class GBDeviceAppAdapter extends ArrayAdapter<GBDeviceApp> {
|
||||
|
||||
private final Context context;
|
||||
|
@ -1,10 +1,10 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.miband;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class DeviceInfo extends AbstractInfo {
|
||||
public DeviceInfo(byte[] data) {
|
||||
super(data);
|
||||
|
@ -1,5 +1,9 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.miband;
|
||||
|
||||
import android.bluetooth.BluetoothGatt;
|
||||
import android.bluetooth.BluetoothGattCharacteristic;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Calendar;
|
||||
import java.util.UUID;
|
||||
@ -8,9 +12,6 @@ import nodomain.freeyourgadget.gadgetbridge.GBCommand;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBDevice.State;
|
||||
import nodomain.freeyourgadget.gadgetbridge.btle.AbstractBTLEDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.btle.TransactionBuilder;
|
||||
import android.bluetooth.BluetoothGatt;
|
||||
import android.bluetooth.BluetoothGattCharacteristic;
|
||||
import android.util.Log;
|
||||
|
||||
public class MiBandSupport extends AbstractBTLEDeviceSupport {
|
||||
|
||||
@ -134,6 +135,7 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
|
||||
|
||||
/**
|
||||
* Sets the current time to the Mi device using the given builder.
|
||||
*
|
||||
* @param builder
|
||||
*/
|
||||
private MiBandSupport setCurrentTime(TransactionBuilder builder) {
|
||||
|
@ -1,11 +1,5 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.pebble;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.BluetoothCommunicationService;
|
||||
import nodomain.freeyourgadget.gadgetbridge.ControlCenter;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBDeviceApp;
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
@ -20,6 +14,12 @@ import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.BluetoothCommunicationService;
|
||||
import nodomain.freeyourgadget.gadgetbridge.ControlCenter;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBDeviceApp;
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
|
||||
|
||||
public class PebbleAppInstallerActivity extends Activity {
|
||||
|
||||
|
@ -1,27 +1,5 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.pebble;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.AppManagerActivity;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GB;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBCallControlReceiver;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBDeviceIoThread;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBMusicControlReceiver;
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceCommand;
|
||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceCommandAppInfo;
|
||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceCommandAppManagementResult;
|
||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceCommandCallControl;
|
||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceCommandMusicControl;
|
||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceCommandVersionInfo;
|
||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceProtocol;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
@ -38,6 +16,28 @@ import android.support.v4.app.NotificationCompat;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.AppManagerActivity;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GB;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBCallControlReceiver;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBDeviceIoThread;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBMusicControlReceiver;
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceCommand;
|
||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceCommandAppInfo;
|
||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceCommandAppManagementResult;
|
||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceCommandCallControl;
|
||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceCommandMusicControl;
|
||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceCommandVersionInfo;
|
||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceProtocol;
|
||||
|
||||
public class PebbleIoThread extends GBDeviceIoThread {
|
||||
private static final String TAG = PebbleIoThread.class.getSimpleName();
|
||||
private static final int NOTIFICATION_ID = 2;
|
||||
|
Loading…
Reference in New Issue
Block a user