Skip to content
This repository has been archived by the owner on Aug 16, 2019. It is now read-only.

Using this as a background service #1

Open
drakula84 opened this issue Jan 12, 2015 · 6 comments
Open

Using this as a background service #1

drakula84 opened this issue Jan 12, 2015 · 6 comments

Comments

@drakula84
Copy link

Hi

Great plugin.. thanks for that. I need to have permanent connection with the server.. is it possible to have this plugin run as a background service so that the service still runs if the app is killed? Or is there a better solution for that scenario?

@wf9a5m75
Copy link
Owner

Although this plugin does not run in service (because of I didn't design for it), the source code is able to run in service.
Create a service class, then copy the source code.

@drakula84
Copy link
Author

Thanks, yes, I did it and it seems to work. However, https didn't work out of box. I will need to investigate it a bit further. I have seen this thread: socketio/socket.io-client-java#26 - but I will read it tomorrow.

Had you tested it with https?

@wf9a5m75
Copy link
Owner

Yes, this library works fine with https. I uses https://github.com/nkzawa/socket.io-client.java in my work project.
Do you use self-signed ssl file, perhaps?

@drakula84
Copy link
Author

Hi yes, I am using self-signed certificates, but I tried to install it on my device and it said certificate is installed. However, it doesnt list it under Security-Credential Storage-Trusted Credentials. I am not too sure if it is supposed to list it there anyway.

Should it work with self signed certs once they are installed?

@drakula84
Copy link
Author

Using the SSL configuration code from page below makes it work:
https://github.com/jonathanve/socket-io-android/blob/master/client-snippet.java

@servco50
Copy link

asda

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants