For offloading the UI thread you could use Macroid, which packs a couple orders of magnitude less methods ;) See here: http://macroid.herokuapp.com/whynot.html#threading and here: http://macroid.herokuapp.com/#threading.
On Sunday, December 29, 2013 11:43:57 PM UTC, JamesJ wrote: > > Thanks for all the good info. > > I had to bail on Scaloid, as it caused the dex to fail with too many > methods (~49000) I know it's probably some config problem, but I didn't > have much time to track it down. With Scala, it is pretty easy to build to > do quite a bit of utility building on your own as needed. > > I also bailed on AKKA, as it seemed way too much headache for what I > needed. I am just using a Handler and HandlerThread for a background > thread, then using post and runOnUiThread to msg back and forth. > (Note: there are lots of opinions on how best to do backgrounding. About > half of them suggest using AsyncTask, but the Big Nerd Ranch book on > Android warns that AsyncTask are run all on one thread in the latest > versions of android. I.e. if you do too much, you can make other apps > behave poorly.) For me, using immutable data and posting provides some > some pretty simple solutions. > > > On Sun, Dec 29, 2013 at 1:48 PM, Perry Nguyen <[email protected]<javascript:> > > wrote: > >> That's actually a very good suggestion, my proguard cache behaves in the >> same way (as it is based off of what you did conceptually) >> >> >> On Sun, Dec 29, 2013 at 11:46 AM, James Moore >> <[email protected]<javascript:> >> > wrote: >> >>> On Thu, Dec 26, 2013 at 10:45 PM, Nick Stanchenko >>> <[email protected]<javascript:> >>> > wrote: >>> >>>> P.S. If you use Props[A] or the like for creating actors, you’ll need >>>> to add -keep lines for the actor classes as well. I suggest to just use >>>> Props(new A) instead. >>>> >>> >>> One other trick is to create a dummy class that contains calls to things >>> that you want to keep, and then just tell proguard to keep that one class. >>> Sometimes that's easier than mucking around with the Proguard config. Put >>> a call to new A in a class that's never instantiated, and you don't have to >>> change the way you normally create Akka objects. >>> >>> >>> If you're using my Eclipse plugin, doing it this way will improve your >>> cache hits too, since the plugin doesn't know anything about things you've >>> kept via proguard config files. >>> >>> -- >>> James Moore >>> [email protected] <javascript:> >>> http://blog.restphone.com/ >>> http://www.linkedin.com/in/jamesmmooreiv >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "scala-on-android" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected] <javascript:>. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "scala-on-android" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- You received this message because you are subscribed to the Google Groups "scala-on-android" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
