Maybe I'm not understanding the situation correctly, but we're told it's important to have only one instance of the RxBleClient.
Couldn't this be easily accomplished by making it a static member of the Application class?
class MyApp extends Application {
static RxBleClient rxBleClient;
...
}
Also, I'm having a hard time understanding this code (from your Application class):
public static RxBleClient getRxBleClient(Context context) {
RxBleApp application = (RxBleApp) context.getApplicationContext();
return application.rxBleClient;
}
Could you help me understand what it's doing, and why? Why couldn't it simply
return rxBleClient;