Skip to content

HttpClientWrapper to use switch between using Java Http and Ok Http for android#335

Open
kalynstricklin wants to merge 9 commits intoopensensorhub:masterfrom
kalynstricklin:http-client-wrapper
Open

HttpClientWrapper to use switch between using Java Http and Ok Http for android#335
kalynstricklin wants to merge 9 commits intoopensensorhub:masterfrom
kalynstricklin:http-client-wrapper

Conversation

@kalynstricklin
Copy link

  • Added httpclientwrapper to use java or okhttp during runtime based on httpclient availability
  • Added oauth
  • Added register system datastreams to update existing datastreams instead of creating new ones

@kalynstricklin kalynstricklin marked this pull request as draft February 18, 2026 20:39
@kalynstricklin kalynstricklin marked this pull request as ready for review February 19, 2026 21:52
import org.sensorhub.impl.service.consys.client.ConSysApiClientConfig;
import org.sensorhub.impl.service.consys.resource.ResourceFormat;

public interface IHttpClient

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably make this more generic for a range of uses. For example, a driver could use this to send GET requests for sensor data and be compatible with Android by default. It also may be a good idea to have the client API and implementation live in sensorhub-core, but I'm not 100% sure

We cannot guarantee that the foi id on the local observations are the same as the ones registered on the remote node
@kalynstricklin
Copy link
Author

@earocorn Can you leave input on the foi id additions

@earocorn
Copy link

This re-adds logic to use FOI IDs that are created on the remote node, since we can't guarantee that both nodes use the same ID encoders / encoding mechanism (db vs no db).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants