Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| lwc:programming:mobile:android:threads [2022/01/17 16:21] – created John Harrison | lwc:programming:mobile:android:threads [2022/05/11 19:03] (current) – John Harrison | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | A hodge-podge of tips, snippets, etc. in my journey to figure out the Android thread thing. | + | //A hodge-podge of tips, snippets, etc. in my journey to figure out the Android thread thing.// | 
| ==== Run a routine every second ==== | ==== Run a routine every second ==== | ||
| === With Handler === | === With Handler === | ||
| - | //I assume since this is with '' | ||
| < | < | ||
| final Handler handler = new Handler(); | final Handler handler = new Handler(); | ||
| Line 16: | Line 15: | ||
| </ | </ | ||
| === With Timer === | === With Timer === | ||
| - | //Does this run in separate thread?// | ||
| < | < | ||
| new Timer().scheduleAtFixedRate(new TimerTask() { | new Timer().scheduleAtFixedRate(new TimerTask() { | ||
| Line 26: | Line 24: | ||
| </ | </ | ||
| + | ==== Classes and Interfaces ==== | ||
| + | Creating an anonymous class: | ||
| + | * Do you have to have an Interface to create the class because it seems to look like this: | ||
| + | < | ||
| + | InterfaceName instanceName InterfaceName() { | ||
| + | // put your loved ones here; | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | An interface wouldn' | ||
| + | |||
| + | ===== References ===== | ||
| + | * [[https:// | ||
| + | ===== Not Completely Digested ===== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||