kernelmaster kernelmaster - 1 year ago 148
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?

Answer Source

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


EditText myEditText = (EditText)findViewById(;
String content = myEditText.getText().toString();    
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download