We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi folks,
Just wondering if there's any way to input an IP address from within a sketch, while it is running on Android, that would set and change the current address that it's sending on
If it is possible, I'd be very grateful for a code example
Answers
anyone able to help with this?
hey there, i think i know what you are trying to achieve, but honestly your question is kind of difficult to understand without any more specifics on whats sending to whom etc.
so here is what i think your question is:
you want to be able to input an ip address into a running android sketch, and then use it to establish some kind of connection.
to achive this you could write some simple touch keypad to enter the ip. then verify the input and use it to establish your connection. of course you would have to catch all the possible exceptions that could be thrown, to avoid a crash of the sketch. i might be able to post some example code later.
here the quick code example how to input an ip/string during the runtime of the sketch. not android specific, but the general concept should be clear. you can then use the string to establish your new connection.