use the latest NBSProxy dev release

This commit is contained in:
Eric House 2019-03-12 07:05:51 -07:00
parent 91ff2175f6
commit 61395f07e9
2 changed files with 17 additions and 4 deletions

View file

@ -273,7 +273,7 @@ dependencies {
implementation 'com.google.firebase:firebase-messaging:17.3.4' // rm-for-fdroid implementation 'com.google.firebase:firebase-messaging:17.3.4' // rm-for-fdroid
implementation 'com.google.firebase:firebase-core:16.0.6' // rm-for-fdroid implementation 'com.google.firebase:firebase-core:16.0.6' // rm-for-fdroid
implementation 'com.github.eehouse:nbsproxy:v0.1.0' implementation 'com.github.eehouse:nbsproxy:v0.2.1'
} }
task mkImages(type: Exec) { task mkImages(type: Exec) {

View file

@ -33,6 +33,7 @@ import android.preference.PreferenceManager;
import org.eehouse.android.nbsplib.NBSProxy; import org.eehouse.android.nbsplib.NBSProxy;
import org.eehouse.android.xw4.jni.CommsAddrRec.CommsConnType;
import org.eehouse.android.xw4.jni.XwJNI; import org.eehouse.android.xw4.jni.XwJNI;
import java.util.UUID; import java.util.UUID;
@ -96,10 +97,8 @@ public class XWApp extends Application
WiDirWrapper.init( this ); WiDirWrapper.init( this );
mPort = Short.valueOf( getString( R.string.nbs_port ) ); mPort = Short.valueOf( getString( R.string.nbs_port ) );
if ( NBSProxy.isInstalled( this ) ) {
NBSProxy.register( mPort, BuildConfig.APPLICATION_ID, this ); NBSProxy.register( mPort, BuildConfig.APPLICATION_ID, this );
} }
}
@OnLifecycleEvent(ON_ANY) @OnLifecycleEvent(ON_ANY)
public void onAny( LifecycleOwner source, Lifecycle.Event event ) public void onAny( LifecycleOwner source, Lifecycle.Event event )
@ -127,6 +126,20 @@ public class XWApp extends Application
} }
// NBSProxy.Callbacks // NBSProxy.Callbacks
@Override
public void onProxyAppLaunched()
{
Log.d( TAG, "onProxyAppLaunched()" );
}
@Override
public void onPermissionsGranted()
{
Log.d( TAG, "onPermissionsGranted()" );
GameUtils.resendAllIf( this, CommsConnType.COMMS_CONN_SMS );
}
@Override @Override
public void onDataReceived( short port, String fromPhone, byte[] data ) public void onDataReceived( short port, String fromPhone, byte[] data )
{ {