Changes between Version 5 and Version 6 of AndroidBoincImpl
- Timestamp:
- Feb 19, 2013, 11:38:11 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AndroidBoincImpl
v5 v6 1 1 = AndroidBOINC = 2 2 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. 3 AndroidBOINC is a port of BOINC to Android devices. 8 4 Using AndroidBOINC, BOINC projects can distribute scientific tasks 9 to Android -powereddevices,5 to Android devices, 10 6 enabling volunteers to contribute CPU time of modern smartphones and tablet computers. 11 7 12 8 Projects are free to download the sources of AndroidBOINC from UCB's BOINC repository and configure the client. 13 9 Projects 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 16 10 17 11 == Architecture == 18 12 19 AndroidBOINC combines the two independent BOINC components of Client and Manager. 13 The Android application consists of the regular BOINC Client 14 and an Android-specific GUI. 15 AndroidBOINC combines the two independent BOINC components of Client and GUI. 20 16 21 The BOINC Client gotadapted to accommodate the needs of mobile devices17 The BOINC Client was adapted to accommodate the needs of mobile devices 22 18 and can be cross compiled to run on ARM-Android-based devices. 23 19 To allow volunteers to control the Client, 24 AndroidBOINC's second component is a BOINC Manager,20 AndroidBOINC's second component is a GUI, 25 21 developed for Android using the common design patterns. 26 22 AndroidBOINC bundles those two components together, to be distributed in a single APK. 27 23 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. 24 Client and GUI communicate via RPCs, similar to versions on Windows or Linux. 34 25 35 26 Talking Android, AndroidBOINC consists of a Service (called Monitor), … … 38 29 39 30 40 === Aspects of Android platform ===31 === Aspects of the Android platform === 41 32 42 33 * Storage: … … 63 54 64 55 * 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. 69 58 In most cases according lifecycle-methods are called, however those are not reliable. 70 59 This behavior only applies to applications which are executed in Android's … … 78 67 in its "assets" directory. 79 68 When executed, the Client gets copied to the local storage space and executed from there. 80 81 69 82 70 === Considerations for mobile devices === … … 92 80 only when the device is being connected to a power source, preventing battery drowns. 93 81 82 * Battery temperature: 83 Computation is stopped if battery temperature is above 45 C. 94 84 95 == Limitation == 85 * Battery charge: 86 Computation is stopped if battery charge is below 95%. 96 87 97 The current version of AndroidBOINC can only be attached to a single project. 88 == Config file == 98 89 90 A config file (currently prefs.xml, should be renamed) will contain 91 * "run at boot?" 92 * "seen welcome?" (has the user seen the welcome dialog?) 99 93 100 == Acknowledgements==94 == Installation == 101 95 102 * Pavol Michalec for his work on AndroBOINC (BOINC Manager for Android) 96 Unlike Win/Mac, can't do any logic in the installer. 103 97 104 * Mats for his work on NativeBOINC 98 At end of installation, user is asked whether they want to run app. 99 If so, the GUI does the following: 100 {{{ 101 show "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 105 create prefs.xml 106 run at boot = true 107 seen welcome = true 108 start client 109 }}} 105 110 111 If the user doesn't run the app, nothing will happen until the next time they boot the device (see below). 106 112 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 == 140 114 141 115 "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 {{{ 117 if not "seen welcome" (e.g. prefs.xml doesn't exist) 118 send notification: 119 "click to configure BOINC" 120 if "run at boot" set 121 start the client (not GUI) 122 }}} 147 123 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 {{{ 126 if newer version of client (based on MD5) 127 if client process running 128 kill it 129 copy executable 130 start client 131 else 132 if client process not running 153 133 start client 154 else 155 if client process not running 156 start client 134 }}} 157 135 158 App shutdown by OS 159 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) 167 145 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