goRicochetMobile changed namespace: moving od work to specific namespace

This commit is contained in:
Dan Ballard 2017-10-18 01:00:52 -07:00
parent 2da20a5962
commit 66a25b0efa
6 changed files with 24 additions and 9 deletions

View File

@ -25,6 +25,7 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile project(':goRicochetMobile')
compile project(':goRicochetMobileOd')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'

View File

@ -16,6 +16,8 @@ import android.widget.ProgressBar;
import android.widget.TextView;
import goRicochetMobile.GoRicochetMobile;
import od.Od;
public class ConnectActivity extends AppCompatActivity {
@ -120,7 +122,7 @@ public class ConnectActivity extends AppCompatActivity {
String privateKey = params[0];
String connectToAddr = params[1].replaceFirst(RICOCHET_ADDRESS_PREFIX, "");
try {
GoRicochetMobile.odClientConnect(privateKey, connectToAddr);
Od.odClientConnect(privateKey, connectToAddr);
return "";
} catch (Exception e) {
Log.e(TAG, e.toString());

View File

@ -8,7 +8,7 @@ import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import goRicochetMobile.GoRicochetMobile;
import od.Od;
public class RemoteActivity extends AppCompatActivity {
private static final String DEVICE_NAME_KEY = "deviceName";
@ -118,7 +118,7 @@ public class RemoteActivity extends AppCompatActivity {
private class GetDeviceNameTask extends AsyncTask<Void, Void, String> {
@Override
protected String doInBackground(Void... params) {
String name = GoRicochetMobile.getDeviceName();
String name = Od.getDeviceName();
return name;
}
@ -131,7 +131,7 @@ public class RemoteActivity extends AppCompatActivity {
private class GetBatteryTask extends AsyncTask<Void, Void, String> {
@Override
protected String doInBackground(Void... params) {
String batteryLevel = GoRicochetMobile.getBatteryLevel();
String batteryLevel = Od.getBatteryLevel();
return batteryLevel;
}
@ -144,7 +144,7 @@ public class RemoteActivity extends AppCompatActivity {
private class GetLevelTask extends AsyncTask<Void, Void, Integer> {
@Override
protected Integer doInBackground(Void... params) {
Integer vibeLevel = (int) GoRicochetMobile.getVibeLevel();
Integer vibeLevel = (int) Od.getVibeLevel();
return vibeLevel;
}
@ -158,7 +158,7 @@ public class RemoteActivity extends AppCompatActivity {
@Override
protected Integer doInBackground(Integer... params) {
Integer newVibeLevel = params[0];
GoRicochetMobile.setVibeLevel(newVibeLevel);
Od.setVibeLevel(newVibeLevel);
return newVibeLevel;
}
@ -171,7 +171,7 @@ public class RemoteActivity extends AppCompatActivity {
private class DisconnectTask extends AsyncTask<Void, Void, Void> {
@Override
protected Void doInBackground(Void ...params) {
GoRicochetMobile.odClientDisconnect();
Od.odClientDisconnect();
return null;
}

View File

@ -8,4 +8,5 @@ gobind {
GOMOBILE = "/home/user/src/go/bin/gomobile"
GOBIND = "/home/user/src/go/bin/gobind"
GO = "/home/user/go/bin/go"
}
}

View File

@ -0,0 +1,11 @@
plugins {
id "org.golang.mobile.bind" version "0.2.7"
}
gobind {
pkg = "github.com/dballard/goRicochetMobile/od"
GOPATH = "/home/user/src/go"
GOMOBILE = "/home/user/src/go/bin/gomobile"
GOBIND = "/home/user/src/go/bin/gobind"
GO = "/home/user/go/bin/go"
}

View File

@ -1 +1 @@
include ':app', 'goRicochetMobile'
include ':app', 'goRicochetMobile', 'goRicochetMobileOd'