Changes between Version 5 and Version 6 of AndroidBoincImpl


Ignore:
Timestamp:
Feb 19, 2013, 11:38:11 PM (12 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AndroidBoincImpl

    v5 v6  
    11= AndroidBOINC =
    22
    3 AndroidBOINC is an attempt to port the
    4 Berkeley Open Infrastructure for Network Computing to Android-powered devices.
    5 
    6 The Android application consists of the regular BOINC Client
    7 and an Android-specific BOINC Manager.
     3AndroidBOINC is a port of BOINC to Android devices.
    84Using AndroidBOINC, BOINC projects can distribute scientific tasks
    9 to Android-powered devices,
     5to Android devices,
    106enabling volunteers to contribute CPU time of modern smartphones and tablet computers.
    117
    128Projects are free to download the sources of AndroidBOINC from UCB's BOINC repository and configure the client.
    139Projects are in charge of their version's distribution e.g. on Google's !PlayStore.
    14 Note that AndroidBOINC currently supports only a single project.
    15 
    1610
    1711== Architecture ==
    1812
    19 AndroidBOINC combines the two independent BOINC components of Client and Manager.
     13The Android application consists of the regular BOINC Client
     14and an Android-specific GUI.
     15AndroidBOINC combines the two independent BOINC components of Client and GUI.
    2016
    21 The BOINC Client got adapted to accommodate the needs of mobile devices
     17The BOINC Client was adapted to accommodate the needs of mobile devices
    2218and can be cross compiled to run on ARM-Android-based devices.
    2319To allow volunteers to control the Client,
    24 AndroidBOINC's second component is a BOINC Manager,
     20AndroidBOINC's second component is a GUI,
    2521developed for Android using the common design patterns.
    2622AndroidBOINC bundles those two components together, to be distributed in a single APK.
    2723
    28 Client and Manager communicate via RPCs, similar to versions on Windows or Linux.
    29 
    30 On startup the Android application executes the BOINC Client,
    31 which does not have Android-specific methods implemented and consists
    32 solely out of native source code.
    33 The Client and Manager run as two separate processes.
     24Client and GUI communicate via RPCs, similar to versions on Windows or Linux.
    3425
    3526Talking Android, AndroidBOINC consists of a Service (called Monitor),
     
    3829
    3930
    40 === Aspects of Android platform ===
     31=== Aspects of the Android platform ===
    4132
    4233 * Storage:
     
    6354
    6455 * Lifecycle:
    65   Activities which are not visible at the moment can get
    66   killed by the system.
    67   If the user navigates back to a destroyed application,
    68   it gets reactivated.
     56  Activities which are not visible at the moment can get killed by the system.
     57  If the user navigates back to a destroyed application, it gets reactivated.
    6958  In most cases according lifecycle-methods are called, however those are not reliable.
    7059  This behavior only applies to applications which are executed in Android's
     
    7867  in its "assets" directory.
    7968  When executed, the Client gets copied to the local storage space and executed from there.
    80 
    8169
    8270=== Considerations for mobile devices ===
     
    9280  only when the device is being connected to a power source, preventing battery drowns.
    9381
     82 * Battery temperature:
     83   Computation is stopped if battery temperature is above 45 C.
    9484
    95 == Limitation ==
     85 * Battery charge:
     86   Computation is stopped if battery charge is below 95%.
    9687
    97 The current version of AndroidBOINC can only be attached to a single project.
     88== Config file ==
    9889
     90A config file (currently prefs.xml, should be renamed) will contain
     91 * "run at boot?"
     92 * "seen welcome?" (has the user seen the welcome dialog?)
    9993
    100 == Acknowledgements ==
     94== Installation ==
    10195
    102  * Pavol Michalec for his work on AndroBOINC (BOINC Manager for Android)
     96Unlike Win/Mac, can't do any logic in the installer.
    10397
    104  * Mats for his work on NativeBOINC
     98At end of installation, user is asked whether they want to run app.
     99If so, the GUI does the following:
     100{{{
     101show "Welcome" dialog; say:
     102        - BOINC will run all the time
     103        - only will compute when plugged in and battery mostly charged
     104        - Can changes these using Preferences tab
     105create prefs.xml
     106        run at boot = true
     107        seen welcome = true
     108start client
     109}}}
    105110
     111If the user doesn't run the app, nothing will happen until the next time they boot the device (see below).
    106112
    107 == Getting Started ==
    108 
    109 To get your project running on Android, please note:
    110 
    111  *  [AndroidBuildClient Build AndroidBOINC]
    112 
    113  *  [AndroidBuildApp Build apps for AndroidBOINC]
    114 
    115 
    116 prefs.xml
    117         "run at boot"
    118         "seen welcome"
    119 
    120 client is started by "Monitor" (Java)
    121         background thread
    122         can be killed by OS
    123 
    124 Installation:
    125         (can't do any logic)
    126 
    127         if user chooses to run GUI:
    128                 GUI
    129                         prefs.xml doesn't exist
    130                         show "Welcome" dialog
    131                                 BOINC will run all the time
    132                                 only will compute when plugged in and battery mostly charged
    133                                 Can changes these using Preferences tab
    134                         create prefs.xml
    135                                 run at boot = true
    136                                 seen welcome = true
    137                         starts client
    138 
    139         if user doesn't choose to run app:
     113== Boot time ==
    140114
    141115"boot receiver" function
    142         if not "seen welcome" (e.g. prefs.xml doesn't exist)
    143                 send notification:
    144                 "click to configure BOINC"
    145         if "run at boot" set
    146                 starts the client (not GUI)
     116{{{
     117if not "seen welcome" (e.g. prefs.xml doesn't exist)
     118        send notification:
     119        "click to configure BOINC"
     120if "run at boot" set
     121        start the client (not GUI)
     122}}}
    147123
    148 GUI startup
    149         if newer version of client (based on MD5)
    150                 if client process running
    151                         kill it
    152                 copy executable
     124== GUI startup ==
     125{{{
     126if newer version of client (based on MD5)
     127        if client process running
     128                kill it
     129        copy executable
     130        start client
     131else
     132        if client process not running
    153133                start client
    154         else
    155                 if client process not running
    156                         start client
     134}}}
    157135
    158 App shutdown by OS
    159         GUI
    160                 if lose connection to client
    161                         wait until system is not low on memory
    162                                 how to do this on 2.3?
    163                         restart client
    164         client
    165                 Is there a C++ func to find if low mem?
    166                 don't launch any app if low memory
     136== App shutdown by OS ==
     137 * GUI
     138  * if lose connection to client, wait until system is not low on memory
     139  * then restart client
     140 * client
     141  * don't launch any app if low memory
     142  * Is there a C++ func to find if low mem?
     143 * wrapper
     144  * if task got SIGKILL, temporary_exit(60)
    167145
    168         wrapper
    169                 if task got SIGKILL
    170                         temporary_exit(60)
    171 
    172 GUI exit
    173         need an "exit all" button some
     146== GUI exit ==
     147 * leave the client running
     148 * need an "exit all" button some