kernelmaster kernelmaster - 7 months ago 35
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();