I have a very long String. And I have a function write(String str) that can only support a string with 20 chars. How can I do to cut my long string into strings of 20 chars and loop in my write() function ?
Sorry, what I did :
for(String retval: pic.split("",20)) {
mBluetoothLeService.writeCharacteristic(characteristic, retval)
pic is my long String. however doing this, It's not doing what I want
Thank you in advance !