Changes between Version 4 and Version 5 of AndroidBoincImpl


Ignore:
Timestamp:
Feb 19, 2013, 6:54:55 PM (11 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AndroidBoincImpl

    v4 v5  
    5151 *  Permissions:
    5252  Android restricts access to certain features with its permission system.
    53   Required permissions have to be declared in the !AndroidManifest file at compile-time,
     53  Required permissions have to be declared in the !AndroidManifest
     54  file at compile-time,
    5455  the user then gets prompted to grant access upon installation.
    5556  AndroidBOINC requires the "Network" and permission in order to
    56   transmit workunits and setup socket for the RPC communication in-between Manager and Client.
    57   The permission "RECEIVE_BOOT_COMPLETED" is used to start the BOINC Client upon boot.
     57  transmit workunits and setup socket for the RPC communication
     58  in-between Manager and Client.
     59  The permission "RECEIVE_BOOT_COMPLETED" is used to start
     60  the BOINC Client upon boot.
    5861  Permissions get granted to the App-specific Linux User ID,
    5962  and therefore also applies to its child-processes.
    6063
    6164 * Lifecycle:
    62   Activities which are not visible at the moment can get killed by the system.
    63   If the user navigates back to a destroyed application, it gets reactivated.
     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.
    6469  In most cases according lifecycle-methods are called, however those are not reliable.
    6570  This behavior only applies to applications which are executed in Android's
     
    108113 *  [AndroidBuildApp Build apps for AndroidBOINC]
    109114
     115
     116prefs.xml
     117        "run at boot"
     118        "seen welcome"
     119
     120client is started by "Monitor" (Java)
     121        background thread
     122        can be killed by OS
     123
     124Installation:
     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:
     140
     141"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)
     147
     148GUI startup
     149        if newer version of client (based on MD5)
     150                if client process running
     151                        kill it
     152                copy executable
     153                start client
     154        else
     155                if client process not running
     156                        start client
     157
     158App 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
     167
     168        wrapper
     169                if task got SIGKILL
     170                        temporary_exit(60)
     171
     172GUI exit
     173        need an "exit all" button some