Android Final

Classified in Computers

Written at on English with a size of 2.42 KB.

ANR: hablar UI thread (ui elements accesible solo x ay)
Single t = t1 -> t2 -> t3
Multi t = create t -> t1 y t4, t2 y t3... -> join t
thr time assign by cpu, not deterministic, necces 2 join or sync threads. Ui tasks -> ui t
thr issues: concurrency and sync (data shared), independence of task (require other 2 finish 1st), increases complex
asynctk

URL url
HTTPUrlConnection(url)
huc.GetInStr.
bfrdr(InputStrReadr(is))
while ((l = br.ReadLine) != null) ,>


JSON: []array, {}object
toJson() from object
fromJson() to object


data pers: save data btw exec of app. Why? App reboot, out of ram. Is not most important of app. Do not center app around data. KISS, DRY, YAGNI. charact: similar 2 any other systm, limited storage, limited ram and procesing pwr, connection limit. || local: data stored in phone, no comunic with outside world remote: data stored in server, phone just screen of data. Dependence of conn.  mix: same info local n remote, sync is the key. Caching (data download and cached, opportunistic), hoarding (when user need data, download and store, planned) || sharedprefs: save retrieve primitive data type. Like a json, key a string, value a primitive  files: format data as you wish but a way to can be retrieved. Internal (private, only app), external (can be removed). sqlite: most used, sqliteopenhelper, syntax similar to sql.

Entradas relacionadas: