kernelmaster kernelmaster - 5 months ago 27
Java Question

Convert value from edit text to byte

i've searched a lot now, but i didn't find anything, so i'll ask here.
This is the code i've got a the moment:

byte[] valueofet = (EditText)findViewById(;
String base64 = Base64.encodeToString(valueofet, Base64.DEFAULT);

The error Eclipse is giving me:

Type mismatch: cannot convert from EditText to byte[]

Can you help me?


Hmm, it seems you're new to JAVA as well.


EditText myEditText = (EditText)findViewById(;
String content = myEditText.getText().toString();