Android: Read and Write Primitive Types to Internal Storage -


is possible read , write primitive datatypes to/from file in internal storage?

i've found plenty of tutorials , examples using read(bytes[]) , similar functions, nothing reading , writing, example, data members class, or bunch of ints, doubles, , strings. relying on function blindly reads number of bytes , trying parse result offsets , typecasting seems non-android me, can't seem find alternative.

perhaps i'm attempting use wrong tool wrong job , that's why i'm running roadblock. i'm writing app connects via bluetoothle (using worst api i've ever seen, that's project requirements called i'm stuck it), , after connect device, want save device's "name" appears akin mac address bluetooth, , next time see device want display "friendly name" more human-readable name know after connecting device first time. lets me display friendly name device has been connected before - , skip authentication step. there, perhaps, better mechanism internal storage store kind of data? i.e. few strings , int.

there several methods, read documantation. case maybe use sharedpreferences or better create simple sqlite database.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -