123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664 |
- #LyX 1.6.5 created this file. For more info see http://www.lyx.org/
- \lyxformat 345
- \begin_document
- \begin_header
- \textclass paper
- \use_default_options true
- \language english
- \inputencoding auto
- \font_roman default
- \font_sans default
- \font_typewriter default
- \font_default_family default
- \font_sc false
- \font_osf false
- \font_sf_scale 100
- \font_tt_scale 100
-
- \graphics default
- \paperfontsize default
- \spacing single
- \use_hyperref false
- \papersize a4paper
- \use_geometry false
- \use_amsmath 1
- \use_esint 1
- \cite_engine basic
- \use_bibtopic false
- \paperorientation portrait
- \secnumdepth 3
- \tocdepth 2
- \paragraph_separation skip
- \defskip medskip
- \quotes_language english
- \papercolumns 1
- \papersides 1
- \paperpagestyle default
- \tracking_changes false
- \output_changes false
- \author ""
- \author ""
- \end_header
-
- \begin_body
-
- \begin_layout Title
- Context-Aware API for Android Devices
- \end_layout
-
- \begin_layout Author
- Chris Smith
- \begin_inset Newline newline
- \end_inset
-
- Supervisor: Naranker Dulay
- \end_layout
-
- \begin_layout Date
- Summer 2010
- \end_layout
-
- \begin_layout Standard
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Abstract
- In recent years location-based services have seen a dramatic increase in
- adoption, and all modern smartphone platforms have integrated services
- to facilitate the creation location-aware applications.
- Such applications enhance the experience of users, using location to modify
- content or alter the behaviour of the application to better suit the circumstan
- ces.
- \end_layout
-
- \begin_layout Abstract
- The product of this project is a
- \emph on
- context
- \emph default
- -aware API for the Android platform.
- This allows applications to augment the already available location data
- with extra
- \emph on
- context
- \emph default
- about the user's situation - primarily their current activity.
- It also develops an algorithm for recognising
- \emph on
- places
- \emph default
- which are relevant to the user, and monitoring which activities are performed
- in
- \emph on
- journeys
- \emph default
- between those places, thus enabling predictions of the user's likely destinatio
- n based on their activity.
- \end_layout
-
- \begin_layout Abstract
- Research into other methods of annotating context was conducted, and it
- was found that most potential sources of context information either produced
- little or no information, or were too battery-draining to perform in a
- real world environment with current technology.
- Much effort was placed into optimising the API to have as small effect
- on battery life as possible.
- \end_layout
-
- \begin_layout Abstract
- A context-aware API was successfully produced, along with a collection of
- applications which use the API in order to demonstrate its features or
- provide example use cases.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout LyX-Code
- \begin_inset CommandInset toc
- LatexCommand tableofcontents
-
- \end_inset
-
-
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- \begin_inset FloatList figure
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- \begin_inset FloatList table
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout LyX-Code
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Part
- Introduction
- \end_layout
-
- \begin_layout Section
- Proposal
- \end_layout
-
- \begin_layout Quote
- Objective: to create an API for android applications to query the user's
- [probable] current activity, and to consider and implement possible uses
- for this API in existing applications.
- The user's activity would be determined based on available sensor and ambient
- data (e.g.
- time, location, orientation/movement of device, background noises, camera
- image, in-range bluetooth devices, etc), previous behaviour of the user,
- and possibly behaviour of other users which has been shared between devices.
- \end_layout
-
- \begin_layout Quote
- Motivation: Activity-awareness would be a major step forward in making mobile
- devices better able to adapt to what the user wants to do with them.
- The latest generation of mobile phones have made location-aware applications
- quite ubiquitous, and a lot of these could be further enhanced by making
- them activity aware.
- For example, an application which lists businesses in a certain area could
- not only know the search area (by merit of being location-aware), but could
- also make an educated guess at what you're looking for (e.g.
- the activity API may suggest the user is likely to be going to lunch, so
- the application could initially show nearby eating establishments instead
- of requiring the user to search for them).
- \end_layout
-
- \begin_layout Quote
- Challenges/issues: primary challenge is developing an algorithm which can
- make reasonable estimates as to the user's activity (or attempting and
- then justifying why such an algorithm is not feasible, and investigating
- requirements or alternatives), and would form the bulk of the project.
- Sub-challenges within this include: researching/implementing machine learning
- techniques so the algorithm can take previous behaviour into account, processin
- g data from 'messy' inputs such as mic/camera, and designing an API that
- would enable third-party app developers to easily make their applications
- activity aware.
- \end_layout
-
- \begin_layout Quote
- Approach: data from sensors would need to be processed (e.g.
- mic input processed into a figure for ambient noise level in dB).
- The combination of this processed data would then need to be fed into an
- algorithm (possibly a neural network) to determine likelihood of various
- activities.
- There would need to be some mechanism for users to correct or train the
- system (at least initially), and it's possible that this data could then
- be shared to other users of the api/application.
- \end_layout
-
- \begin_layout Section
- Aims and Motivation
- \end_layout
-
- \begin_layout Standard
- The primary aim of this project is to create an application for the Android
- platform that can sense the user's context in some fashion.
- This application will have a public interface which will allow other applicatio
- ns written by third party developers to read and receive updates about the
- user's context.
- \end_layout
-
- \begin_layout Standard
- The ease of access to location aware services in modern smartphone platforms
- has lead to a surge in the number of applications which improve their utility
- or behaviour by integrating location information.
- It stands to reason that if additional context information were available,
- developers would be able to take advantage of this and further improve
- the utility of their applications.
- This, in turn, would increase the productivity of the end-user.
- \end_layout
-
- \begin_layout Standard
- As discussed in
- \begin_inset CommandInset ref
- LatexCommand ref
- reference "par:Background"
-
- \end_inset
-
- , a large amount of existing research has been done on context-aware devices,
- and specifically on activity-aware systems.
- There have also been some limited implementations for smartphones.
- Unfortunately, the end product of most of this research is not suitable
- for deployment or use in practical, every-day circumstances.
- This project aims to produce a working prototype which can be used on a
- day-to-day basis on an Android smartphone without significantly degrading
- performance.
- \end_layout
-
- \begin_layout Section
- Issues and challenges
- \end_layout
-
- \begin_layout Standard
- One of the main challenges for this project will be accomplishing accurate
- and useful context-awareness without significantly hindering the battery
- life or performance of a typical device.
- Existing algorithms tend to be extremely verbose, sometimes performing
- upwards of thousands of calculations per classification; on a mobile device
- this is likely to severely cripple battery life.
- \end_layout
-
- \begin_layout Standard
- The problem of battery life affects all areas of the project - from how
- often data is collected, how the data is then analysed, and which sources
- of potential data are consulted.
- A large amount of time will need to be spent analysing the various potential
- data sources and establishing whether or not the cost in consulting them
- is worth the reduction in battery lifetime and any gain in the reliability
- or accuracy of context information.
- \end_layout
-
- \begin_layout Standard
- The aim of the application is to provide the context data to third-party
- applications, so another challenge will be designing an appropriate interface
- which will allow applications to query and receive updates about the user's
- context.
- Consideration will have to be given as to any security measures (such as
- access control) which may need to be applied in order to protect user privacy.
- \end_layout
-
- \begin_layout Section
- Structure
- \end_layout
-
- \begin_layout Standard
- Part
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "par:Background"
-
- \end_inset
-
- summarises some of the current work in the field of context-aware systems
- and activity inference.
- Part
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "par:Activity-classification"
-
- \end_inset
-
- explains in detail the techniques developed to classify user activity from
- accelerometer data, applications developed to facilitate this, and analyses
- data collected from users to determine the accuracy of the activity classificat
- ion algorithms.
- Parts
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "par:Other-sensors"
-
- \end_inset
-
- and
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "par:Places"
-
- \end_inset
-
- deal with potential context information from other sensors such as microphones
- and cameras, and the contextual value of the user's location, and how interesti
- ng places can be inferred.
- \end_layout
-
- \begin_layout Standard
- Part
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "par:The-Context-Analyser"
-
- \end_inset
-
- introduces the Context Analyser, the primary output of this proejct, and
- its suite of related applications.
- The project is evaluated in part
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "par:Evaluation"
-
- \end_inset
-
- and conclusions drawn and future work considered in part
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "par:Conclusion"
-
- \end_inset
-
- .
- \end_layout
-
- \begin_layout Standard
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Part
- Background
- \begin_inset CommandInset label
- LatexCommand label
- name "par:Background"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- Context- or Activity-Aware devices is an area currently under lots of research.
- There are many and varied applications of activity-aware devices, ranging
- from personal fitness and healthcare to training factory workers or merely
- playing music.
- \end_layout
-
- \begin_layout Standard
- While this research is going on, there has been a huge expansion in the
- ownership, use and power of mobile telephones.
- Mobile telephones are so ubiquitous and now come with such a large sensor
- platform that they are the obvious choice for implementing activity-aware
- technologies for use in day-to-day life.
- \end_layout
-
- \begin_layout Standard
- This project aims to make a context-aware API available on an open mobile
- platform, which will enable developers to start adding context-aware functional
- ity to their applications without the extremely large overhead of writing
- a logger and classifier themselves, or re-engineering the application to
- use an existing context-aware framework if one is available.
- \end_layout
-
- \begin_layout Section
- Applications
- \end_layout
-
- \begin_layout Standard
- There are many documented applications of activity-aware systems, and current
- research efforts which bring the technology to mobile telephones will only
- serve to lengthen this list.
- \end_layout
-
- \begin_layout Standard
- The canonical example for activity-awareness, especially on mobile telephones,
- is modeling the user's
- \begin_inset Quotes eld
- \end_inset
-
- interruptibility
- \begin_inset Quotes erd
- \end_inset
-
-
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Siewiorek2003,Raento2005"
-
- \end_inset
-
- .
- This allows the software to know whether it's appropriate (or "polite")
- to disturb the user, and can advise the user's contacts when they are busy.
- It can also be used to create a
- \begin_inset Quotes eld
- \end_inset
-
- smart answering machine
- \begin_inset Quotes erd
- \end_inset
-
-
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Hudson2003"
-
- \end_inset
-
- which can selectively direct calls straight to an answering machine if
- the user is engaged in an "uninterpretable" activity and the call does
- not appear to be important.
- These allow the user's mobile telephone to better approximate human behaviour
- - when approaching someone in person it is normally quite easy to determine
- whether it would be polite or necessary to disturb them, based on their
- demeanour, activity, and the urgency of your request; when picking up the
- telephone it is not possible at all without assistance from an activity-aware
- system.
- \end_layout
-
- \begin_layout Standard
- The current implementations of these ideas have several problems, however.
- The more interesting research
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Hudson2003"
-
- \end_inset
-
- requires a static camera fixed in an office to observe user behaviour,
- instead of implementing it directly on a telephone, which obviously constrains
- its usefulness.
- Of the two solutions actually targeted at mobile telephones, one
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Siewiorek2003"
-
- \end_inset
-
- requires bulky custom hardware which the user must carry on their belt,
- and the other
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Raento2005"
-
- \end_inset
-
- does not expose an API to other applications and only surfaces the context-aware
- functionality in two small applications whose focus is on social interaction
- rather than improving the user's experience of the telephone locally.
- This project will aim to bring the ideas of these to generic hardware (an
- Android mobile telephone), and to provide an API which other applications
- can harness.
- \end_layout
-
- \begin_layout Standard
- One use particularly suitable for mobile phones is dynamic adaptation of
- the device's settings based on the user's current activity and context
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Schmidt1999"
-
- \end_inset
-
- .
- When a user is walking the device can dynamically increase the font size
- to make it easier to read with an unsteady hand, and correspondingly decrease
- it when the user is stationary.
- In a similar fashion, the brightness of the backlight can be altered based
- on the ambient light level, and the ringer volume altered according to
- the noise level.
- Unfortunately this research did not progress beyond a feasibility study
- and was implemented on a Nokia 6110, which is severely outdated by today's
- standards.
-
- \end_layout
-
- \begin_layout Standard
- Another popular area for activity-aware systems is in healthcare.
- Such systems can be used to monitor vulnerable people as they go about
- day to day activities to ensure that they're not in trouble - several systems
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Song2005,Maurer2006"
-
- \end_inset
-
- can be used to monitor elderly persons and summon help if it is detected
- that they have fallen.
- Another healthcare application
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Tentori2008"
-
- \end_inset
-
- allows nurses to remotely monitor the activities of their patients in a
- hospital ward, allowing them to respond to problems and keep up-to-date
- with their patients' well-being while not physically present.
- Activity-aware applications have also been used to try to encourage users
- to be more healthy; one novel application records the day-to-day fitness
- activities a user performs and uses this as a basis for a virtual
- \begin_inset Quotes eld
- \end_inset
-
- garden
- \begin_inset Quotes erd
- \end_inset
-
- that blossoms or wilts according to how much the user works out in a week
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Consolvo2008"
-
- \end_inset
-
- .
- \end_layout
-
- \begin_layout Standard
- As well as monitoring activities which the user is familiar with, activity-aware
- systems can also be used to assist users in learning new activities.
- One application
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Stiefmeier2008"
-
- \end_inset
-
- monitors the activities of trainee workers in a car manufacturing plant,
- and helps to provide a link between theoretical classroom-based training
- and practical work.
- The activity-aware system can offer advice to the workers that's directly
- related to the current task they're performing, and can even monitor their
- activities for compliance with procedures and give them a score afterwards.
- \end_layout
-
- \begin_layout Standard
- While the research into healthcare and training applications present novel
- uses of activity-aware systems, the applications themselves are not really
- applicable to a mobile device or the scope of this project.
- The research does, however, describe the techniques used in those applications
- for activity classification and should prove useful in that respect.
- \end_layout
-
- \begin_layout Standard
- Other areas of research include making activity-aware suggestions to the
- user
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Bellotti2008"
-
- \end_inset
-
- , or issuing reminders or alerts based on the user's activity
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Schilit1994"
-
- \end_inset
-
- .
- One example of the latter is an activity-aware system that detects when
- the user is making coffee, and plays a sound on a remote computer to alert
- thirsty coworkers to the fact.
- Sound isn't only limited to alerts, however: the
- \noun on
- XPOD
- \noun default
-
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Dornbush2005"
-
- \end_inset
-
- project is an activity-aware music player, which tailors the music being
- played to the user's current activity based on their past ratings.
- This type of activity-aware device presents a much greater level of personalisa
- tion than previously possible, and making this type of customisation available
- to mobile telephone users and application developers will surely result
- in many new applications.
- \end_layout
-
- \begin_layout Section
- Inferring activity
- \end_layout
-
- \begin_layout Standard
- There are three general phases in most context-aware systems: a sensing
- component, which reads or receives raw sensor data relating to the user's
- environment or activity; a feature extraction component, which analysis
- the sensor data and identifies a set of features from that data; and a
- classification component, which uses the extracted features to reason about
- the user's activity
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Choudhury2008"
-
- \end_inset
-
- .
- Each of these components will be expanded on below.
- Depending on the method of classification, some initial or continuous training
- may be required, and this is also considered below.
- \end_layout
-
- \begin_layout Subsection
- Sensors and devices
- \end_layout
-
- \begin_layout Standard
- At the basis of activity-recognition are the physical hardware sensors.
- The most commonly used sensor is the accelerometer, which outputs the accelerat
- ion of the sensor
- \begin_inset Foot
- status collapsed
-
- \begin_layout Plain Layout
- and thus the device to which it's attached, and therefore the person using
- the device
- \end_layout
-
- \end_inset
-
- along a certain axis.
- There is extensive research on using accelerometers to classify activities
- such as walking
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Mathie2004,Garakani2009"
-
- \end_inset
-
- (including whether or not the subject is walking on flat ground or up and
- down stairs
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Caros2005"
-
- \end_inset
-
- ), running
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Garakani2009"
-
- \end_inset
-
- , falling
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Mathie2004"
-
- \end_inset
-
- , sitting
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Mathie2004,Garakani2009"
-
- \end_inset
-
- , cycling
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Garakani2009"
-
- \end_inset
-
- , etc.
- \end_layout
-
- \begin_layout Standard
- Smartphones also come equipped with a microphone and GSM stack (prerequisites
- for a telephone conversation!), and commonly a camera, geolocation API
- (usually backed by GPS) and Bluetooth stack.
- With the exception of the latter two, these types of sensors are not particular
- ly well explored for their use in context-aware systems at present.
- It is easy to reason how each would be useful - a microphone can reveal
- the ambient noise, which could indicate the difference between sitting
- in a library and a bar; the camera likewise can reveal the lighting conditions
- (if the device is not in a pocket or bag).
- The GSM stack can provide rough location information and also a signal
- strength to one or more cell towers; the signal strength will vary both
- with the user's proximity to the cell tower and the environment around
- them - being inside will degrade the signal more than being in open air,
- for example - so may provide vital clues to a context-aware system.
- One aspect of this project will be to research how the microphone, camera
- and GSM stack can be used to enhance existing activity classification algorithm
- s.
- \end_layout
-
- \begin_layout Standard
- Current research on location information and Bluetooth device proximity
- is summarised in section
- \begin_inset CommandInset ref
- LatexCommand ref
- reference "sec:Location-analysis"
-
- \end_inset
-
- (p
- \begin_inset CommandInset ref
- LatexCommand pageref
- reference "sec:Location-analysis"
-
- \end_inset
-
- ) and
- \begin_inset CommandInset ref
- LatexCommand ref
- reference "sec:Bluetooth-1"
-
- \end_inset
-
- (p
- \begin_inset CommandInset ref
- LatexCommand pageref
- reference "sec:Bluetooth-1"
-
- \end_inset
-
- ) respectively.
- \end_layout
-
- \begin_layout Subsection
- Feature detection
- \end_layout
-
- \begin_layout Standard
- It is not possible to reason directly about raw sensor inputs, so the next
- step in inferring activities is to extract useful
- \emph on
- features
- \emph default
- from the raw input.
- Features are usually mathematical properties of the input data, such as
- the difference between the minimum and maximum data point in a given time
- frame.
- Most classifiers use an extremely large number of features -
- \begin_inset CommandInset citation
- LatexCommand citet
- key "Hein2008"
-
- \end_inset
-
- detect 562 different features from their inputs.
- \end_layout
-
- \begin_layout Standard
- Some of the more commonly used features in activity-recognition systems
- are: mean, standard deviation, energy, entropy, correlation between axis,
- and discrete FFT coefficients
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Huynh2005"
-
- \end_inset
-
- .
- Obviously, not all features are of equal value.
- FFT coefficients are generally very good indicators of activity, but the
- ideal coefficients and window sizes vary depending on the exact activity
- that is being detected.
- Likewise, the choice of other features to give the best recognition rate
- varies depending on the activity being detected
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Huynh2005"
-
- \end_inset
-
- .
- \end_layout
-
- \begin_layout Standard
- As the sensor data is received continuously, it needs to be partitioned
- somehow before features are extracted.
- Most implementations use a sliding window approach with a 50% overlap between
- windows
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Bao2004"
-
- \end_inset
-
- .
- A window size of 10 seconds with a 50% overlap would result in one set
- of features being computed every 5 seconds.
- The window size is normally selected to correspond to a pre-defined number
- of samples to enable fast computation of certain features - most notably
- FFTs
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Bao2004"
-
- \end_inset
-
- .
- \end_layout
-
- \begin_layout Standard
- One challenge will be determining a set of features that are robust enough
- to perform activity analysis on, but are sufficiently inexpensive to calculate
- continually on a mobile device, where CPU speed is limited and excessive
- usage results in undesirable higher battery consumption.
- \end_layout
-
- \begin_layout Subsection
- Training
- \end_layout
-
- \begin_layout Standard
- In order to meaningfully classify and label activities, some kind of training
- generally needs to be performed beforehand.
- The choice of classifier affects how much offline analysis has to be done
- on the training set, and whether or not it can be adapted at run-time.
- \end_layout
-
- \begin_layout Standard
- One might expect that training would best be performed in a controlled environme
- nt, to reduce external influences on the user, but subjects in a laboratory
- setting are much more self-conscious about their movements, and this manifests
- itself in the data collected.
- Walking in a laboratory tends to produce acceleration data showing a consistent
- gait cycle which can be split into distinct phases, whereas walking in
- an uncontrolled setting produces data showing large fluctuations in gait
- phases and length.
- This means that classifiers trained on laboratory data may achieve a much
- lower accuracy when deployed in natural conditions
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Bao2004"
-
- \end_inset
-
- .
- \end_layout
-
- \begin_layout Subsection
- Classification
- \end_layout
-
- \begin_layout Standard
- The classification step involves feeding the features for frame into some
- kind of machine learning algorithm which can, using training data
- \begin_inset Foot
- status collapsed
-
- \begin_layout Plain Layout
- and any offline analysis made of that data
- \end_layout
-
- \end_inset
-
- , determine which activity the feature-set most like represents.
- There are many different algorithms that can be used to perform the classificat
- ion, some of which are discussed below.
- \end_layout
-
- \begin_layout Subsubsection
- Decision trees
- \end_layout
-
- \begin_layout Standard
- Decision trees are possibly one of the simplest approaches possible
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Hudson2003"
-
- \end_inset
-
- .
- A tree is constructed such that each node contains a test function, with
- branches for each possible discrete outcome of the function.
- This allows data to be classified with a
- \begin_inset Quotes eld
- \end_inset
-
- divide and conquer
- \begin_inset Quotes erd
- \end_inset
-
- approach.
- While high accuracy is possible in some circumstances
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Hudson2003"
-
- \end_inset
-
- , there are several drawbacks to decision trees: a plain decision tree has
- no way to model uncertainty - in an activity-aware system there will always
- be a degree of uncertainty as to the classification, and being able to
- measure this is an important tool.
- They also have an inductive bias which leads to a preference for the most
- general solution, and in most cases this generalisation causes many false
- results
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Shen2004"
-
- \end_inset
-
- .
- \end_layout
-
- \begin_layout Standard
- Decision trees require the structure of the tree and the test functions
- for each node to be determined during training.
- They do not lend themselves to minor on-the-fly modifications or new activities
- that are not part of the training set.
- \end_layout
-
- \begin_layout Subsubsection
- Neural networks
- \end_layout
-
- \begin_layout Standard
- Neural networks are based on an extremely simplified model of the brain.
- The network consists of layers of neurons, and each neuron performs a simple
- arithmetic operation on its inputs.
- This normally consists of taking each of its inputs, multiplying it by
- a weight, and then summing all of the weighted inputs together; the resulting
- figure then becomes the neuron's output, and the input to one or more nodes
- in the next layer.
- \end_layout
-
- \begin_layout Standard
- A network consists of a layer of input neurons, a layer containing one or
- more output neurons, and one or more layers of
- \begin_inset Quotes eld
- \end_inset
-
- hidden
- \begin_inset Quotes erd
- \end_inset
-
- neurons in between.
- The number of
- \begin_inset Quotes eld
- \end_inset
-
- hidden
- \begin_inset Quotes erd
- \end_inset
-
- layers, and the number of neurons within those layers must be chosen before
- training of the network begins.
- The training process will then determine the weights for each link in the
- network.
- The choice of number of layers poses a problem when designing a network,
- as too small a number can cripple the power of the network, but too large
- can cause it to be too expensive to evaluate and can possibly lead to it
- memorising erroneous data
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Dornbush2005"
-
- \end_inset
-
- .
- \end_layout
-
- \begin_layout Standard
- Neural networks, however, do provide good accuracy and could potentially
- (although not easily) be modified on-the-fly to cope with new activities.
- \end_layout
-
- \begin_layout Subsubsection
- Genetic algorithms
- \end_layout
-
- \begin_layout Standard
- Genetic algorithms use the principle of natural selection to 'evolve' a
- solution to a problem.
- A set of random solutions are created, and a pre-defined fitness function
- is used to determine their relative worth.
- The best solutions are then combined together to produce the next generation
- of solutions, in a manner roughly analogous to reproduction in animals.
- Small
- \begin_inset Quotes eld
- \end_inset
-
- mutations
- \begin_inset Quotes erd
- \end_inset
-
- are also introduced into each generation to counter the effect of local
- maxima being reached.
- \end_layout
-
- \begin_layout Standard
- Genetic algorithms can be combined with other techniques such as neural
- networks - the weights in the neural network can be
- \begin_inset Quotes eld
- \end_inset
-
- evolved
- \begin_inset Quotes erd
- \end_inset
-
- using genetic algorithms to create a neural network which is good as satisfying
- the fitness function.
- \end_layout
-
- \begin_layout Standard
- The drawback of genetic algorithms is the need for a fitness function -
- the network will only ever be as good as the fitness function, and if you
- have a way to define what makes a good network you could in most cases
- hardcode the solution instead of evolving a network to satisfy it.
- \end_layout
-
- \begin_layout Subsubsection
- Instance-based learning
- \end_layout
-
- \begin_layout Standard
- Instance-based learning (IBL)
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Witten2000"
-
- \end_inset
-
- algorithms are a class of
- \begin_inset Quotes eld
- \end_inset
-
- lazy
- \begin_inset Quotes erd
- \end_inset
-
- algorithms.
- They perform classification based on previously observed instances that
- have already been classified.
- There is no training required for IBLs, they're extremely adept at adapting
- to new scenarios, and they have a very low error rate
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Dornbush2005"
-
- \end_inset
-
- which makes them ideal for activity-recognition.
- \end_layout
-
- \begin_layout Standard
- One particular type of IBL algorithm which is frequently seen in activity-aware
- research is the K-Nearest Neighbour (KNN) algorithm
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Han2006"
-
- \end_inset
-
- .
- With the KNN algorithm, each sample is treated as a vector, and the distance
- \begin_inset Foot
- status collapsed
-
- \begin_layout Plain Layout
- the euclidean distance is usually used, but any metric will suffice
- \end_layout
-
- \end_inset
-
- between the sample and the existing instances is calculated.
- The sample is then classified according to the classification of the majority
- of its
- \begin_inset Formula $k$
- \end_inset
-
- nearest neighbours.
- \end_layout
-
- \begin_layout Standard
- One drawback of IBLs is that each new instance tends to be remembered for
- future use, which eventually results in large amounts of memory consumption
- and complexity when comparing distances of new samples.
- This can be partially overcome by only storing instances which would affect
- the classification of new samples
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Witten2000"
-
- \end_inset
-
- .
- \end_layout
-
- \begin_layout Standard
- The KNN algorithm can be easily extended to support dynamic classification
- of new types of activities - if a sample is not within a certain distance
- of sufficient other samples, it can be classified as a new type of activity.
- \end_layout
-
- \begin_layout Subsubsection
- Conclusion
- \end_layout
-
- \begin_layout Standard
- There are numerous machine learning algorithms available and suitable for
- use in activity classification tasks.
- There has been a lot of research into their use, and all of the algorithms
- discussed have produced good results.
- Because of the lack of need for any training, however, the K-Nearest Neighbour
- algorithm appears to be the most promising for a mobile device.
- Any algorithm that needs explicit training prior to classification would
- almost certainly require a desktop application or a remote service to analyse
- the data, as it typically requires large amounts of memory and expensive
- computations.
- This either makes the application extremely cumbersome for the user (they
- have to connect their phone to a computer, transfer a file, obtain and
- run a separate application, then transfer some file back), or puts a large
- resource burden onto the distributor (having to remotely analyse all of
- the data from all users would require dedicated hardware for any more than
- a few users).
- \end_layout
-
- \begin_layout Section
- Mobile telephones
- \end_layout
-
- \begin_layout Standard
- It's hard to overstate the ubiquity of mobile telephones at present.
- In 2003, over a billion mobile telephones were sold - six times as many
- as the number of personal computers
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Eagle2004"
-
- \end_inset
-
- .
- In 2007, this same figure describes the number of cameraphones sold
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Reynolds2008"
-
- \end_inset
-
- , clearly representing a substantial growth in sales and advancements in
- the technology.
- In fact, mobile telephones are the fastest adopted technology in human
- history
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Eagle2004"
-
- \end_inset
-
- .
- This ubiquity, coupled with the fact that mobile telephones are comfortably
- carried around on a daily basis by most of their users, makes them a very
- attractive alternative to more traditional platforms used for activity-aware
- research, which typically involved bulky or inconvenient apparatus that
- was expensive to manufacture
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Schmidt2008"
-
- \end_inset
-
- and made users very self-conscious.
- \end_layout
-
- \begin_layout Subsection
- iPhone
- \end_layout
-
- \begin_layout Standard
- There have been several published works related to activity-recognition
- on the iPhone.
- The similarity between iPhone and Android platforms means that many of
- the concepts developed for or used on the iPhone are applicable to both.
- \end_layout
-
- \begin_layout Subsubsection
- iLearn
- \end_layout
-
- \begin_layout Standard
-
- \noun on
- iLearn
- \noun default
-
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Schmidt2008"
-
- \end_inset
-
- is a suite of three tools -
- \noun on
- iLog
- \noun default
- ,
- \noun on
- iModel,
- \noun default
- and
- \noun on
- iClassify
- \noun default
- - which together allow for real-time classification of low-level activities.
-
- \noun on
- iLog
- \noun default
- is run on the user's iPhone and allows the user to specify which activity
- they will be performing.
- The application then records raw sensor data from the iPhone's three-axis
- accelerometer and 124 features computed from this data in real-time.
- The data is then stored on the device, annotated with the selected activity.
- \end_layout
-
- \begin_layout Standard
- The training data collected by
- \noun on
- iLog
- \noun default
- is then transferred to a desktop computer where
- \noun on
- iModel
- \noun default
- uses a Naïve Bayesian Network (NBN) to create a model which can be used
- to classify future input.
- The choice of NBNs was based on their ability to classify a set of trial
- data correctly, and the low computational cost of classifying data once
- the model has been generated.
- \end_layout
-
- \begin_layout Standard
- Once the model has been created, it is transferred back to the device where
- it is used by
- \noun on
- iClassify
- \noun default
- .
- This provides an API for other applications, and allows them to register
- for a callback which it publishes the user's current activity to every
- second.
- \end_layout
-
- \begin_layout Standard
- Unfortunately, neither the source code nor the API are published.
- The inability to run background processes on the iPhone suggests that any
-
- \begin_inset Quotes eld
- \end_inset
-
- API
- \begin_inset Quotes erd
- \end_inset
-
- would have to be more like a framework where the third-party developer
- has to re-engineer their application to use the
- \noun on
- iClassify
- \noun default
- application as a base.
- This is undesirable as it makes it extremely difficult to adapt existing
- applications to use the activity-aware API, and is a very cumbersome way
- of providing what could be a very minor piece of functionality for the
- application.
- \end_layout
-
- \begin_layout Subsubsection
- Evaluation
- \end_layout
-
- \begin_layout Standard
- \begin_inset CommandInset citation
- LatexCommand citet
- key "Miluzzo2009"
-
- \end_inset
-
- present an evaluation of the iPhone for use in
- \begin_inset Quotes eld
- \end_inset
-
- people-centric sensing applications
- \begin_inset Quotes erd
- \end_inset
-
- .
- One of the major drawbacks highlighted is that the iPhone does not support
- applications which run in the background.
- This means that any application wishing to perform continuous real-time
- activity detection would need to run as a foreground process, preventing
- the user from using the device for any other function.
- \end_layout
-
- \begin_layout Standard
- The research also shows that the computational compatibility of the iPhone
- is more than sufficient to perform the necessary calculations for a typical
- activity-recognising application, which suggests that any modern smart
- phone would be capable of these.
- \end_layout
-
- \begin_layout Subsubsection
- Multitasking
- \end_layout
-
- \begin_layout Standard
- Since the evaluation presented above was written, Apple have announced a
- new version of the iPhone OS which supports pseudo multi-tasking.
- However, this form of multi-tasking only allows a limited set of predefined
- functions to be performed, such as playing audio or monitoring location.
- This still prevents continuous real-time activity detection from taking
- place in a useful fashion.
- \end_layout
-
- \begin_layout Standard
- Further, because of the homogeneous hardware and memory model employed by
- the iPhone, applications typically make assumptions about the amount of
- free memory that will be available to them.
- This prevents any real implementation of multi-tasking, as background apps
- would infringe on this fixed amount of free memory.
- It is therefore unlikely that future updates will enable true, uninhibited
- multi-tasking, as it would break compatibility with a lot of existing applicati
- ons.
- \end_layout
-
- \begin_layout Subsection
- Android
- \end_layout
-
- \begin_layout Standard
- While the Android platform is relatively new, it is rapidly gaining market
- share on the more established mobile operating systems.
- A December 2009 survey
- \begin_inset CommandInset citation
- LatexCommand cite
- key "ChangeWave2010"
-
- \end_inset
-
- shows that 21% of respondents want their next smartphone purchase to run
- Android, a 350% increase from the same survey conducted three months prior.
- This is compared to the iPhone, which dropped 4% to 28% in the same time
- period.
- Gartner, a respected IT research firm, predicts that by 2012, Android will
- be the second most popular mobile operating system globally
- \begin_inset CommandInset citation
- LatexCommand cite
- key "ComputerWorld2010"
-
- \end_inset
-
- .
- \end_layout
-
- \begin_layout Standard
- In addition to its rapidly increasing popularity, the Android platform offers
- several advantages over the iPhone platform.
- Most notably is the ability to run background processes (called
- \noun on
- services
- \noun default
- ), which will allow a classifier application to run without interfering
- with the user's normal use of their mobile telephone.
- In addition, the Android OS provides access to the Bluetooth and GSM stacks,
- allowing for data from both to be used for activity detection.
- \end_layout
-
- \begin_layout Standard
- The ability to run a background process will enable a proper API for sharing
- activity data with other applications, which will allow third-party developers
- to make their applications context-aware with relatively little work on
- their part.
- This is extremely desirable as it will allow rapid prototyping of applications,
- which will hopefully lead to innovative new uses of activity classification.
- \end_layout
-
- \begin_layout Standard
- While it is purported
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Garakani2009"
-
- \end_inset
-
- that there is research being done on bringing activity-awareness to Android
- platforms, there does not seem to be any work published on this matter
- or any applications available to support it.
- While there a small number of self-proclaimed
- \begin_inset Quotes eld
- \end_inset
-
- context-aware
- \begin_inset Quotes erd
- \end_inset
-
- applications for Android, this context is almost exclusively limited to
- geolocation.
- This project will therefore produce one of the first publicly available
- activity-aware applications for the Android platform.
- \end_layout
-
- \begin_layout Section
- Location analysis
- \begin_inset CommandInset label
- LatexCommand label
- name "sec:Location-analysis"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- Location-based services are currently undergoing an
- \begin_inset Quotes eld
- \end_inset
-
- explosion
- \begin_inset Quotes erd
- \end_inset
-
-
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Bellavista2008"
-
- \end_inset
-
- , thanks to improvements in technology, and greater openness on the part
- of service providers and handset manufacturers.
- All modern smartphone platforms have a geolocation stack, usually backed
- by a GPS chipset and in most cases augmented with either a database of
- known cell tower locations, or a map of known WiFi network identifiers
- and locations, or both.
- The two databases allow for rough geolocation when GPS is not available,
- or for greatly decreased lookup time when a GPS lock is available.
- \end_layout
-
- \begin_layout Standard
- However, while the geolocation stack is a rich source of data, it is a poor
- source of information.
- A latitude/longitude pair may describe the user's exact location, but a
- user would be hard-pressed to tell the difference between the latitude/longitud
- e of their home, place of work, or of somewhere in between the two with
- no real significance.
- A great deal of research has therefore been devoted to detecting meaningful
- locations from GPS traces.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Quotes eld
- \end_inset
-
- Place recognition
- \begin_inset Quotes erd
- \end_inset
-
- has two phases: learning and recognising.
- An initial learning phase analyses a sensor log and segments the data into
- places where the device is stable (stationary), and designates this as
- a
- \begin_inset Quotes eld
- \end_inset
-
- waypoint
- \begin_inset Quotes erd
- \end_inset
-
- .
- It then merges
- \begin_inset Quotes eld
- \end_inset
-
- waypoints
- \begin_inset Quotes erd
- \end_inset
-
- that appear to identify the same place being visited multiple times.
- The second phase uses these learned waypoints to recognise when the device
- is revisiting a place, and therefore also when the device is not visiting
- a previously known place (for example when it is moving between two)
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Hightower2005"
-
- \end_inset
-
- .
- \end_layout
-
- \begin_layout Standard
- Unfortunately, quite a lot of research into location analysis uses GPS
- \begin_inset Quotes eld
- \end_inset
-
- blackspots
- \begin_inset Quotes erd
- \end_inset
-
- to identify useful places
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Nurmi2006,Liao2007b"
-
- \end_inset
-
- .
- With older GPS chipsets, the satellite signal would be lost when the user
- entered a building, and this allowed an inference that the current location
- was probably a place of interest.
- However, modern GPS chipsets receive a signal in most indoor locations.
- It is possible that a decrease in signal strength or number of locked satellite
- s may still occur, or that GSM signal strength could be used instead, but
- these ideas have not been widely explored at present.
- \end_layout
-
- \begin_layout Standard
- There is, however, plenty of research relating to the use of location data
- outdoors.
- One application
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Liao2007b"
-
- \end_inset
-
- learns not only the user's frequently visited places, but the method of
- transport used between them and the typical routes taken.
- It can then offer instructions showing the user how to go from place to
- place, or issue alerts if the user appears to be going the wrong way (by
- getting on the wrong bus, for instance).
- The ability to correctly infer the user's destination would be extremely
- useful in a context-aware system: a user walking to do their grocery shopping
- is almost certainly going to want to interact with their phone differently
- than a user on a bus going to work.
- \end_layout
-
- \begin_layout Section
- Bluetooth
- \begin_inset CommandInset label
- LatexCommand label
- name "sec:Bluetooth"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- The user's context depends on not only what they are doing, where they are
- doing it, but also who they are with.
- Sitting and eating lunch with a manager is quite a different context to
- sitting and eating lunch with a spouse.
- It would therefore be desirable to be able to identify between different
- people when performing context analysis.
- \end_layout
-
- \begin_layout Standard
- One of the few ways that a mobile telephone can identify other people is
- by searching for
- \emph on
- their
- \emph default
- mobile telephones.
- This can be done by scanning for Bluetooth devices, which involves broadcasting
- a
- \begin_inset Quotes eld
- \end_inset
-
- device inquiry
- \begin_inset Quotes erd
- \end_inset
-
- message; if a device chooses to answer the inquiry, it discloses its unique
- MAC address and device class
- \begin_inset Foot
- status collapsed
-
- \begin_layout Plain Layout
- the device class tells us whether the device is a computer or a mobile telephone
- , for example
- \end_layout
-
- \end_inset
-
- .
- Unfortunately, this requires the person to not only be carrying a mobile
- telephone, but a Bluetooth-enabled model, and for them to have configured
- their device to have Bluetooth enabled and to be
- \begin_inset Quotes eld
- \end_inset
-
- visible
- \begin_inset Quotes erd
- \end_inset
-
- .
- A study in 2004
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Eagle2004"
-
- \end_inset
-
- found that only 1 in 150 people had such a configured device on a university
- campus.
- This figure will undoubtedly be greater now, and may well be greater when
- in public, but it highlights that only a handful of people may be detectable
- via their Bluetooth devices.
- \end_layout
-
- \begin_layout Standard
- A study in 2006
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Nicolai2006"
-
- \end_inset
-
- used a similar technique to monitor the social context of the user, introducing
- the idea of
- \begin_inset Quotes eld
- \end_inset
-
- familiar
- \begin_inset Quotes erd
- \end_inset
-
- people,
- \begin_inset Quotes eld
- \end_inset
-
- unfamiliar
- \begin_inset Quotes erd
- \end_inset
-
- people and
- \begin_inset Quotes eld
- \end_inset
-
- familiar strangers
- \begin_inset Quotes erd
- \end_inset
-
- .
- These labels were applied based on the number of times their Bluetooth
- devices were detected
- \begin_inset Foot
- status collapsed
-
- \begin_layout Plain Layout
- and by extension the number of times the user had come into contact with
- them
- \end_layout
-
- \end_inset
-
- .
- While the definition of
- \begin_inset Quotes eld
- \end_inset
-
- familiar
- \begin_inset Quotes erd
- \end_inset
-
- and
- \begin_inset Quotes eld
- \end_inset
-
- unfamiliar
- \begin_inset Quotes erd
- \end_inset
-
- are quite obvious,
- \begin_inset Quotes eld
- \end_inset
-
- familiar strangers
- \begin_inset Quotes erd
- \end_inset
-
- is a new class of people used to describe those who the user encounters
- repeatedly, but doesn't interact with.
- This may include neighbours that are passed on the street, or fellow commuters
- on a journey into work.
- The number of people in each of those groups (and any changes in those
- numbers) can be used to infer how
- \begin_inset Quotes eld
- \end_inset
-
- comfortable
- \begin_inset Quotes erd
- \end_inset
-
- the user feels with their social context, and whether their current activity
- is part of a normal routine or is novel.
- \end_layout
-
- \begin_layout Standard
- This research has, to date, not been readily combined with activity-aware
- applications, and this project will aim to integrate the results of Bluetooth
- scanning with
- \begin_inset Quotes eld
- \end_inset
-
- classical
- \begin_inset Quotes erd
- \end_inset
-
- activity classification techniques and to evaluate whether it provides
- any benefit.
- \end_layout
-
- \begin_layout Section
- Power management
- \begin_inset CommandInset label
- LatexCommand label
- name "sec:Power-management"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- One major consideration when deploying an application on a mobile device
- is the amount of power it will use.
- An application constantly polling any one sensor can reduce battery life
- significantly, and an application which kept all available sensors active
- (in addition to doing CPU-heavy analysis on them) would drain the battery
- in a typical smartphone in a matter of hours.
- A context-aware application is not very useful for a user if they can only
- use their telephone for an hour or two before it needs recharging!
- \end_layout
-
- \begin_layout Standard
- One solution
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Wang2009"
-
- \end_inset
-
- is to only use one or two sensors to monitor the user's activity until it
- appears to be transitioning.
- For example, if the user is believed to be walking, the application only
- needs to periodically check either the accelerometer (to confirm the user
- is still making walking motions) or GPS (to confirm the distance traveled
- is still consistent with walking) to know that their activity has not changed.
- As soon as the user's behaviour becomes inconsistent with walking, the
- application can bring other sensors online until it has successfully reclassifi
- ed the activity, and then resume monitoring with minimal sensors.
- \end_layout
-
- \begin_layout Standard
- Another option
- \begin_inset CommandInset citation
- LatexCommand cite
- key "Wang2009"
-
- \end_inset
-
- (which can be used in conjunction) is to only enable sensors for a short
- amount of time, and then sleep for a period before reactivating them.
- The
- \begin_inset Quotes eld
- \end_inset
-
- duty cycle
- \begin_inset Quotes erd
- \end_inset
-
- suggested for accelerometers is 6 second of sensing followed by 10 seconds
- of sleeping.
- The six second window is enough time to allow for capturing a full range
- of motion (several complete strides) if the user is walking or running,
- and then the ten second sleep stops the accelerometer using battery power
- until the next cycle.
- This process obviously means that a sudden switch in activity will not
- be noticed immediately, but a delay of a few seconds is acceptable as most
- activities will last for minutes or longer.
- \end_layout
-
- \begin_layout Standard
- The battery life on modern smartphones rarely exceeds 24 hours of typical
- use, so it is extremely important that any applications developed for this
- project does not significantly reduce this.
- A balance between prompt detection and notification of activity changes
- and battery use by sensors and processing algorithms will need to be found.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Part
- \begin_inset CommandInset label
- LatexCommand label
- name "par:Activity-classification"
-
- \end_inset
-
- Activity classification
- \end_layout
-
- \begin_layout Section
- Sensor Logger application
- \end_layout
-
- \begin_layout Standard
- The primary component of context that this project aims to expose is the
- user's activity.
- The main factor in determining a user's activity is the data retrieved
- from the device's accelerometers.
- This gave rise to the project's first published application, titled
- \noun on
- Sensor Logger
- \noun default
- .
- The first version of
- \noun on
- Sensor Logger
- \noun default
- consisted of a single activity containing a large amount of text describing
- the project, an editable text field where the user could name their activity,
- and a button which initiated logging.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float figure
- wide false
- sideways false
- status collapsed
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename components.png
- width 60page%
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Sensor Logger component diagram
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Sensor-Logger-component"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
- Once the user tapped the 'Start' button, the application launched a service
- which registered with the device's SensorManager and requested fast updates
- from both the accelerometer and the magnetic field sensor.
- Every 50ms the last value received from each axis on each sensor was written
- along with a timestamp to a file on the device.
- After 1024 samples were collected (a total of around 51 seconds), the service
- launched an uploader service and terminated itself.
- The uploader service read the file from the device's flash memory, opened
- a HTTP connection to the project website, and submitted the data to a PHP
- script.
- The PHP script in turn stored the data in a MySQL database.
-
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Sensor-Logger-component"
-
- \end_inset
-
- shows the relationship between the various components involved in the Sensor
- Logger application.
- \end_layout
-
- \begin_layout Subsection
- Market and user input
- \begin_inset CommandInset label
- LatexCommand label
- name "sub:Market-and-user"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- The Sensor Logger application was made available on the Android Market,
- under the name 'Sensor Logger Test'.
- The description briefly outlined the aim of the project and emphasised
- that the Sensor Logger was a data gathering tool and didn't really provide
- any utility to end users.
- Despite this, over 1,000 submissions were received from anonymous users.
- While some of these did not provide any use for the reasons discussed in
-
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sec:Manual-classification"
-
- \end_inset
-
- , a number were manually classified and used to generate the model used
- in the final application.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float figure
- wide false
- sideways false
- status open
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename analysis_of_user-submitted_sensor_logger_data_sets.png
- width 60page%
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Analysis of user-submitted Sensor Logger results
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Analysis-of-user-submitted"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
-
- Version 0.2.0 of the Sensor Logger application introduced functionality where
- it classified the activity on the device before asking the user to name
- it (see
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sec:On-device-classification"
-
- \end_inset
-
- ).
- This allowed the submitted data to be augmented with an extra field saying
- what the activity classification algorithm thought the activity was.
- If the user confirmed that the activity was correct, the manual activity
- annotation was set to 'UNCLASSIFIED/NOTCORRECTED'.
- \end_layout
-
- \begin_layout Standard
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Analysis-of-user-submitted"
-
- \end_inset
-
- shows a breakdown of all the results that were received from version 0.2.0
- or later of the application.
- The raw data is included in
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sec:User-annotated-Sensor-Logger"
-
- \end_inset
-
- .
- Nearly half of all the submissions were classified correctly, and only
- 15% were classified incorrectly.
- A large proportion of the submissions either had no text at all or had
- an activity that didn't make sense, such as
- \begin_inset Quotes eld
- \end_inset
-
- sjxjxgzog
- \begin_inset Quotes erd
- \end_inset
-
- or
- \begin_inset Quotes eld
- \end_inset
-
- it is a cat!
- \begin_inset Quotes erd
- \end_inset
-
- .
- There were also 30 submissions where the user had annotated the data with
- an activity that makes sense, but which isn't supported by the Sensor Logger.
- The majority of these were 'Sleeping' - but it is unclear in these circumstance
- s what the user is actually doing with their device; if it is left on a
- bedside table, for example, then there is no way to distinguish the actual
- activity of the user.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float figure
- wide false
- sideways false
- status open
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename breakdown_of_incorrect_results.png
- width 60page%
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Breakdown of incorrect results
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Breakdown-of-incorrect"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
-
-
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Breakdown-of-incorrect"
-
- \end_inset
-
- shows a breakdown of the results deemed incorrect.
- A large majority of these incorrect results occurred when the user was
- sitting down, and the Sensor Logger incorrectly classified them as being
- in a vehicle of some sort.
- Of the remaining incorrect entries, 15% correctly classified the correct
- top level in the hierarchy (such as 'VEHICLE' or 'WALKING') but then misclassif
- ied further levels; the remaining 25% incorrectly classified this top level
- as well.
- \end_layout
-
- \begin_layout Subsection
- Exception handling
- \end_layout
-
- \begin_layout Standard
- Early user feedback on the Android Market indicated that the Sensor Logger
- application was
- \begin_inset Quotes eld
- \end_inset
-
- Force Closing
- \begin_inset Quotes erd
- \end_inset
-
- .
- This is a reference to the dialog that appears when an application throws
- an unhandled exception and stops running.
- The Market provides no facilities to engage with users, and there were
- no force close issues present on either the Android emulator or several
- physical devices the application was tested on, so it was difficult to
- determine the cause.
- \end_layout
-
- \begin_layout Standard
- In order to gain more data on this issue, an
- \noun on
- UncaughtExceptionHandler
- \noun default
- was written and appropriately registered with the application's thread.
- The exception handler is invoked by the
- \noun on
- Thread
- \noun default
- class any time a thread dies due to an unhandled exception.
- The implementation for the Sensor Logger application copied the details
- of any exception (including the reason and full stack trace) into a file,
- and then uploaded the file with some meta-data to the same website which
- was setup to handle uploading of accelerometer data.
- \end_layout
-
- \begin_layout Standard
- Soon after an updated version of the Sensor Logger was published including
- the new exception handler a report was uploaded.
- The stack trace indicated that the problem was a
- \noun on
- NumberFormatException
- \noun default
- when trying to convert the device's IMEI number into a
- \noun on
- long
- \noun default
- .
- After some brief research it became apparent that CDMA devices do not use
- IMEI numbers, but instead MEIDs (Mobile Equipment Identifier).
- MEIDs are hexadecimal instead of numerical, so obviously cannot be converted
- directly to a numeric type.
- The code was adjusted to decode MEIDs properly and a new version of the
- application published, and the error reports ceased.
- \end_layout
-
- \begin_layout Standard
- From a development perspective, the utility of being notified directly of
- exceptions is immense.
- It is very difficult for users to find the details of an exception following
- a force close, so extremely unlikely that anyone will report problems in
- sufficient detail for them to be fixed.
- The exception handling code was therefore abstracted into a common class,
- and included in every application released as part of this project.
- \end_layout
-
- \begin_layout Section
- Manual classification
- \begin_inset CommandInset label
- LatexCommand label
- name "sec:Manual-classification"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float figure
- wide false
- sideways false
- status collapsed
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename website-windows.png
- height 70pheight%
- rotateAngle 90
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Website for manually classifying windows
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Website-for-manually"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
-
- Once the sensor data was logged in the database, a web interface provided
- a graphical representation of the acceleration and magnetic field readings.
- It also allowed a handful of authenticated users to manually classify overlappi
- ng
- \begin_inset Quotes eld
- \end_inset
-
- windows
- \begin_inset Quotes erd
- \end_inset
-
- of 128 data points.
- The classification portion of the website is shown in
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Website-for-manually"
-
- \end_inset
-
- ; it shows the first six overlapping windows for one submission, with the
- third window highlighted because the user's cursor is over the corresponding
- dropdown.
- Users of this system could define activities in a hierarchical fashion,
- starting with two root nodes - 'CLASSIFIED' and 'UNCLASSIFIED'.
- Early data submitted resulted in a classification hierarchy of:
- \end_layout
-
- \begin_layout Itemize
- UNCLASSIFIED
- \end_layout
-
- \begin_deeper
- \begin_layout Itemize
- PENDING (not yet manually assigned)
- \end_layout
-
- \begin_layout Itemize
- UNKNOWN (unable to determine actual activity from user label)
- \end_layout
-
- \begin_layout Itemize
- DNI (short for
- \begin_inset Quotes eld
- \end_inset
-
- Do Not Include
- \begin_inset Quotes erd
- \end_inset
-
- , for windows which appear erroneous)
- \end_layout
-
- \end_deeper
- \begin_layout Itemize
- CLASSIFIED
- \end_layout
-
- \begin_deeper
- \begin_layout Itemize
- WALKING
- \end_layout
-
- \begin_deeper
- \begin_layout Itemize
- STAIRS (not used in itself)
- \end_layout
-
- \begin_deeper
- \begin_layout Itemize
- UP
- \end_layout
-
- \begin_layout Itemize
- DOWN
- \end_layout
-
- \end_deeper
- \end_deeper
- \begin_layout Itemize
- IDLE (not used in itself)
- \end_layout
-
- \begin_deeper
- \begin_layout Itemize
- SITTING
- \end_layout
-
- \begin_layout Itemize
- STANDING
- \end_layout
-
- \end_deeper
- \begin_layout Itemize
- VEHICLE (not used in itself)
- \end_layout
-
- \begin_deeper
- \begin_layout Itemize
- CAR
- \end_layout
-
- \begin_layout Itemize
- BUS
- \end_layout
-
- \end_deeper
- \begin_layout Itemize
- DANCING
- \end_layout
-
- \end_deeper
- \begin_layout Standard
- It was observed that many samples had erroneous data either at the start
- or the end of the recording.
- This was a result of the user putting the device away in a pocket (as instructe
- d) or picking it back up to check the results.
- A classification of 'DNI', short for 'Do Not Include' was therefore introduced
- which allowed the erroneous windows to be summarily excluded from later
- analysis.
- Later iterations of the Sensor Logger application included a 10 second
- delay at the start to give the user time to put the device away, and sounded
- an audible alert at the end, which reduced the number of records submitted
- with bad data.
- \end_layout
-
- \begin_layout Standard
- Another problem with the user submitted data was that some activity descriptions
- didn't make sense.
- With the earliest versions of the Sensor Logger, a significant number of
- users entered their own name or a nonsensical string into the textbox labeled
-
- \begin_inset Quotes eld
- \end_inset
-
- Activity name
- \begin_inset Quotes erd
- \end_inset
-
- .
- This suggested that users were either not reading or misunderstanding the
- instructions.
- A classification for 'UNKNOWN' was introduced to facilitate removal of
- the records where classifications couldn't be inferred from the activity
- name.
- \end_layout
-
- \begin_layout Section
- Feature extraction
- \end_layout
-
- \begin_layout Standard
- Once a reasonable sample of data had been recorded, the PHP script was modified
- to allow exporting of all classified windows.
- It produced a plain text file containing the sensor readings and timestamp
- for each of the 128 points in each window, as well as the manually-applied
- classification.
- It did not include information as to which windows were from the same sample,
- or the original user-supplied activity name.
- A small sample of this data is included in Appendix
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sec:Extract-from-export"
-
- \end_inset
-
- .
- \end_layout
-
- \begin_layout Standard
- A Java program was written which imported the exported data.
- A series of 'feature extractors' were written.
- These calculated the:
- \end_layout
-
- \begin_layout Itemize
- maximum
- \end_layout
-
- \begin_layout Itemize
- minimum
- \end_layout
-
- \begin_layout Itemize
- range
- \end_layout
-
- \begin_layout Itemize
- median
- \end_layout
-
- \begin_layout Itemize
- mean
- \end_layout
-
- \begin_layout Standard
- Each of these extractors was run over the set of 128 data points from each
- axis on each sensor, giving a total of 30 features.
- It was planned to add further features including Fast Fourier Transforms
- and energy, as suggested by multiple papers consulted in background research.
- \end_layout
-
- \begin_layout Standard
- The program was modified to export the features and classification of each
- window in ARFF
- \begin_inset Note Note
- status open
-
- \begin_layout Plain Layout
- ref
- \end_layout
-
- \end_inset
-
- (Attribute Relation File Format).
- This is a format used by Weka
- \begin_inset Note Note
- status open
-
- \begin_layout Plain Layout
- ref
- \end_layout
-
- \end_inset
-
- , a popular data mining suite developed by the University of Waikato.
- A small sample of the ARFF data is included in Appendix
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sec:Extract-from-ARFF"
-
- \end_inset
-
- .
- The ARFF file was imported into Weka and analysed.
- \end_layout
-
- \begin_layout Standard
- Inspection of a graphical representation of the correlation between mean
- and activity showed that in some samples the mean was negated but of a
- similar magnitude to other samples.
- This can be explained by the device being orientated in a different manner
- when the samples were taken - a static device would record a downwards
- acceleration of 9.8m/s if it is upright, but -9.8m/s if it is upside down.
- An extra feature extractor was therefore added which calculated the
- \emph on
- absolute mean
- \emph default
- .
- \end_layout
-
- \begin_layout Standard
- With these features, it was found that Weka could correctly classify activities
- with an accuracy of in excess of 95% (measured by holding back
- \begin_inset Formula $\frac{1}{3}$
- \end_inset
-
- of the training data) using a K-Nearest Network algorithm with K = 1.
- It was therefore apparent that more complicated feature extraction techniques
- such as Fast Fourier Transforms or Energy would not be necessary to achieve
- a very high classification rate.
- \end_layout
-
- \begin_layout Standard
- A lot of time was spent attempting to reduce the already small set of features
- further.
- Every feature that had to be calculated would result in more CPU usage
- when implemented on the device, which would in turn reduce battery life
- by a greater amount.
- This was done by a combination of experimentation based on educated guesses
- and assumption, and Weka's built in
- \begin_inset Quotes eld
- \end_inset
-
- select attributes
- \begin_inset Quotes erd
- \end_inset
-
- functionality.
- \end_layout
-
- \begin_layout Standard
- In the end, a similar accuracy was achieved using only four features.
- These were the absolute mean and range of the X and Y axes of the accelerometer.
- No data at all was used from the magnetic field sensor or the Z axis of
- the accelerometer.
- This is an very useful result as the features are extremely cheap to calculate,
- and almost trivial to implement on the device.
- No libraries are needed to perform advanced mathematical functions, and
- individual samples do not need to be stored in memory until a complete
- window is obtained - the minimum, maximum and total of samples from the
- two axes simply have to be recorded.
- This is, perhaps, the first time activity inference has been performed
- successfully with such a small number of features.
- \end_layout
-
- \begin_layout Standard
- The application was again modified to read the exported data, calculate
- the four interesting features, and create a mapping of data points to activity.
- This map was serialised into a file using an
- \noun on
- ObjectWriter
- \noun default
- , which allows it to be read on both desktop platforms running a standard
- JVM, and the Android platform which contains compatible serialisation technolog
- y.
- \end_layout
-
- \begin_layout Section
- On-device classification
- \begin_inset CommandInset label
- LatexCommand label
- name "sec:On-device-classification"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- The serialised model was bundled with a new version of the Sensor Logger
- application, along with a completely redesigned user interface.
- The application now consisted of a series of activities: on opening the
- application, the user is presented with an introduction activity which
- explains what the application does and the aims of the project; when they
- click the 'next' button a 10 second countdown is displayed with the instruction
- to put the phone away repeated.
- During the data collection period an animated pattern of dots is displayed
- so the user knows the application is still working if they look at it.
- When data collection is completed, the device adds a notification with
- sound and vibrate settings, and displays another progress screen while
- a background service analyses the data.
- The result of the classification is then displayed prominently and the
- user is presented with two buttons - one to confirm the classification
- and one to reject and correct it.
- The on-device classification (and any correction made to it) is submitted
- along with all the data previously submitted.
- Finally, the user is then presented with a 'Thank you' message, and a unique
- link to the project website where they can view graphs of their activities.
- \begin_inset Note Note
- status open
-
- \begin_layout Plain Layout
- Mess!
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Section
- Activity Recorder application
- \end_layout
-
- \begin_layout Standard
- \begin_inset Note Note
- status open
-
- \begin_layout Plain Layout
- Screenshot
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- The Activity Recorder application was the second application published on
- the market.
- In contrast to the sensor logger, it only records the two relevant axes
- of the accelerometer, and all data is kept in memory instead of being written
- to a file.
- \end_layout
-
- \begin_layout Standard
- The activity recorder consists of a background service which records 128
- samples of sensor data once every 30 seconds.
- At all other times, the accelerometer is not accessed to conserve battery
- power.
- The samples are then classified using the same model as the Sensor Logger
- application, and the resulting activity is appended to a list.
- Consecutive samples which are classified as the same activity are merged
- together.
- \end_layout
-
- \begin_layout Standard
- The user interface displays a list of activities, along with their start
- time and duration in minutes or hours.
- \end_layout
-
- \begin_layout Subsection
- Acquiring data while screen is off
- \begin_inset CommandInset label
- LatexCommand label
- name "sub:Acquiring-data-while"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- The activity recorder brought to light a problem that was discovered to
- be present in the sensor logger as we, but hadn't been noticed at the time.
- When the device's screen was turned off, both applications stopped receiving
- sensor events.
- Some research and experimentation revealed that in order to continue receiving
- sensor data when the device went to
- \begin_inset Quotes eld
- \end_inset
-
- sleep
- \begin_inset Quotes erd
- \end_inset
-
- , the application had to acquire a partial wake lock from the system's power
- manager.
- A full wake lock keeps the device fully awake with the screen on, whereas
- a partial wake lock allows background processing to continue while the
- screen is deactivated.
- \end_layout
-
- \begin_layout Standard
- Once the applications were modified to acquire a partial wake lock, they
- both received sensor data as expected with the screen off.
- However, testing on Android 2.0 (
- \begin_inset Quotes eld
- \end_inset
-
- Eclair
- \begin_inset Quotes erd
- \end_inset
-
- ) devices still showed the original problem.
- The cause of this was a change in the functionality of the sensor manager
- introduced between 1.6 and 2.0 which prevents sensor data being received
- when the device is sleeping, regardless of any wake locks held.
- An issue raised on their official issue tracker revealed that the Android
- developers considered this a bug, and that it would be rectified in a future
- version.
- When Android 2.2 (
- \begin_inset Quotes eld
- \end_inset
-
- Froyo
- \begin_inset Quotes erd
- \end_inset
-
- ) was released, testing revealed that the issue was indeed fixed, and all
- applications worked as expected.
- There therefore exists an incompatibility with handsets running Android
- 2.0 and 2.1.
- \end_layout
-
- \begin_layout Subsection
- Aggregating classifications to smooth results
- \begin_inset CommandInset label
- LatexCommand label
- name "sub:Aggregating-classifications-to"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- Another problem raised by the Activity Recorder application is that of occasiona
- l incorrect results.
- Because each data was only sampled for five seconds once a minute, it is
- possible that during those five seconds the activity being performed does
- not lend itself to proper classification of the user's actual, medium-term
- activity.
- For example, if a user is walking for 20 minutes and happens to stop several
- times to cross roads, samples while the user is stopped will (correctly)
- indicate that they are standing still, but for all practical purposes they
- are still engaged in the act of walking.
- Similarly, when traveling in a car it is possible for occasional samples
- to be misclassified as traveling by bus, or vice-versa.
- \end_layout
-
- \begin_layout Standard
- To combat this problem, an activity
- \begin_inset Quotes eld
- \end_inset
-
- aggregator
- \begin_inset Quotes erd
- \end_inset
-
- was introduced.
- This accepts classifications and uses them to adjust a set of internal
- probabilities for each possible (sub-)classification.
- The algorithm increases the likelihood score of each component in a classificat
- ion by a constant amount, and reduces all other components by a fixed ratio.
- This smooths out results, and allows for classifications not directly supported
- by the model when the data is unclear and alternating.
- This behaviour is most useful when traveling by vehicle and classifications
- alter between
- \begin_inset Quotes eld
- \end_inset
-
- car
- \begin_inset Quotes erd
- \end_inset
-
- and
- \begin_inset Quotes eld
- \end_inset
-
- bus
- \begin_inset Quotes erd
- \end_inset
-
- - both contributed positively to the likelihood of
- \begin_inset Quotes eld
- \end_inset
-
- CLASSIFIED/VEHICLE
- \begin_inset Quotes erd
- \end_inset
-
- , and this ends up being the result presented by the aggregator.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Part
- \begin_inset CommandInset label
- LatexCommand label
- name "par:Other-sensors"
-
- \end_inset
-
- Other sensors
- \end_layout
-
- \begin_layout Section
- Bluetooth
- \begin_inset CommandInset label
- LatexCommand label
- name "sec:Bluetooth-1"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- Being able to identify who the user is accompanied by would be extremely
- beneficial in a context-aware system.
- One of the few ways to do this at present is to monitor the presence of
- other user's mobile telephones by scanning for visible Bluetooth devices.
- As discussed in
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sec:Bluetooth"
-
- \end_inset
-
- , if sufficient devices are visible, users can be classified according to
- whether they are familiar, strangers, or familiar strangers.
- This provides a great deal of context to the user's activity.
- \end_layout
-
- \begin_layout Standard
- Before this Bluetooth algorithm can be implemented, it needs to be determined
- whether there are a sufficient number of discoverable devices to make it
- worthwhile.
- As with any radio transceiver, a lot of battery power is consumed when
- Bluetooth is enabled and the device is actively scanning for others.
- This means that if there are insufficient discoverable devices, the cost
- of enabling and scanning for Bluetooth devices would outweigh the benefits.
- As mentioned previously, there is no use in a very accurate context API
- if the user's battery only lasts for a few hours.
- \end_layout
-
- \begin_layout Standard
- To determine the utility of scanning for Bluetooth devices, a group of three
- volunteers were asked to manually enable Bluetooth and scan for devices
- using the built in functionality exposed in Android's settings screens.
- It was planned to create an application which could scan and classify devices
- appropriately but the Bluetooth API is only exposed to user-space applications
- in version 5 of the Android SDK, which corresponds to the
- \begin_inset Quotes eld
- \end_inset
-
- Eclair
- \begin_inset Quotes erd
- \end_inset
-
- or 2.0 release; at the time of the experiment, only one of the three volunteers
- was using a device for which Eclair was available.
- This also means that adding Bluetooth support would have a further cost
- of having to either limit access to pre-2.0 users, maintain two separate
- versions of the application, or spend extra time developing a solution
- which would attempt to use the Bluetooth API if and only if it is available.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float table
- placement h
- wide false
- sideways false
- status open
-
- \begin_layout Plain Layout
- \begin_inset Tabular
- <lyxtabular version="3" rows="13" columns="7">
- <features>
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <row>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Environment
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Devices
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- People
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Discoverable
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Familiar
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Familiar Strangers
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Strangers
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Car
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0%
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Bus
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 20
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 5%
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 20
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Street
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 2
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 15
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 13%
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 15
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Bar
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 2
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 12
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 17%
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 10
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Office
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 6
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0%
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 5
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Office
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 4
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0%
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 4
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Home
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0%
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Home
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 2
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0%
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 2
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Lecture
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 5
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 80
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 6%
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 10
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 70
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Meeting
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 6
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 17%
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 6
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Restaurant
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 2
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 22
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 9%
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 2
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 19
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Supermarket
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 2
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 200%
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 0
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- </row>
- </lyxtabular>
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Bluetooth scanning results
- \begin_inset CommandInset label
- LatexCommand label
- name "tab:Bluetooth-scanning-results"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
-
- For the experiment, the users were asked to record the number of visible
- Bluetooth devices, their environment and the estimated number of people
- around them.
- They were also asked to classify the people into rough groups of
- \begin_inset Quotes eld
- \end_inset
-
- familiar
- \begin_inset Quotes erd
- \end_inset
-
- (such as co-workers, family and friends),
- \begin_inset Quotes eld
- \end_inset
-
- familiar strangers
- \begin_inset Quotes erd
- \end_inset
-
- (people they see regularly but are not particularly familiar with), or
-
- \begin_inset Quotes eld
- \end_inset
-
- strangers
- \begin_inset Quotes erd
- \end_inset
-
- .
- The results are itemised in
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "tab:Bluetooth-scanning-results"
-
- \end_inset
-
- .
- \end_layout
-
- \begin_layout Standard
- The results show that in general there is a very poor proportion of devices
- that are visible.
- The results also suggest that Bluetooth would be a poor method for finding
-
- \begin_inset Quotes eld
- \end_inset
-
- familiar
- \begin_inset Quotes erd
- \end_inset
-
- people, as the situations with very few strangers generally had almost
- no discoverable devices.
- There are several possible reasons for the low proportion of devices: modern
- phones tend to default to having Bluetooth switched off for reasons of
- battery life and user privacy, and even when enabled the devices tend to
- default to being non-discoverable.
- In fact, Android devices will only allow the user to make the device discoverab
- le for 30 seconds at a time - the setting is automatically reverted after
- this period.
- Another consideration is that the three volunteers are all involved in
- extremely technology-focused settings: one was a student studying a computing
- course, one a software engineer, and one a systems administrator.
- Whether or not these technology-rich settings would artificially inflate
- results (more technology means more discoverable devices) or deflate them
- (more tech-savvy users mean fewer needlessly enabling Bluetooth discovery)
- is unclear.
- \end_layout
-
- \begin_layout Section
- Microphone
- \begin_inset CommandInset label
- LatexCommand label
- name "sec:Microphone"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- Reading raw data from the Microphone on Android is relatively straight forward
- thanks to the built-in
- \noun on
- AudioRecord
- \noun default
- class.
- This allows raw data to be retrieved directly into an array of bytes, where
- it can then be analysed.
- A class was written which constructs an
- \noun on
- AudioRecord
- \noun default
- instance, retrieves a sample of data, and calculates the sound pressure
- level (SPL).
- The SPL can be used to measure the ambient volume of the environment the
- device is in - for example, a quiet room would typically have an SPL of
- 20-30 dB, a television might raise that to the level of 60 dB, and a busy
- road could be up to 90 dB.
- SPL is calculated using the formula
- \begin_inset Formula $L_{p}=20log_{10}(\frac{p_{rms}}{p_{ref}})$
- \end_inset
-
- .
-
- \begin_inset Formula $p_{ref}$
- \end_inset
-
- is the reference sound level and is usually taken to be 20 micropascals,
- which is the limit of human hearing;
- \begin_inset Formula $p_{rms}$
- \end_inset
-
- is the root mean square pressure being measured.
- \end_layout
-
- \begin_layout Standard
- While the class was able to correctly calculate the SPL, it is not used
- in any of the published applications.
- The original intention was to use SPL to assist in activity inference,
- but as shown in
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sub:Market-and-user"
-
- \end_inset
-
- the accelerometer alone achieves a satisfactory classification rate on
- its own.
- The large majority of incorrect classifications revolved around the user
- sitting down and, as sitting is such a universal activity (i.e., it's performed
- everywhere), knowing the ambient SPL will not help in this classification.
- \end_layout
-
- \begin_layout Standard
- While there are certainly use cases for knowing the SPL (the most obvious
- being increasing or decreasing the ringer volume in proportion to the SPL
- to ensure it can be heard), most of them do not involve any other form
- of context that this project is aiming to expose.
- It was therefore decided to not include the SPL data in the main context
- API.
- \end_layout
-
- \begin_layout Section
- Camera
- \begin_inset CommandInset label
- LatexCommand label
- name "sec:Camera"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- The aim of incorporating data from the device's camera was to determine
- the ambient lighting conditions.
- It could possibly then be inferred whether the user was in natural or artificia
- l light, or in darkness.
- However on consultation with a group of five prospective users it became
- clear that at the times at which the device would be classifying context,
- it would almost always be inside a pocket or a bag.
- The only times the device would be able to detect lighting conditions would
- be as the user was using it (which is too late as the device should have
- already adapted to the user's context) or when the device had been left
- on a desk or shelf.
- It was therefore decided to not include camera data at this stage of the
- project.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Part
- \begin_inset CommandInset label
- LatexCommand label
- name "par:Places"
-
- \end_inset
-
- Places
- \end_layout
-
- \begin_layout Section
- Use of GPS/GSM blackspots
- \begin_inset CommandInset label
- LatexCommand label
- name "sec:Use-of-GPS/GSM"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- As discussed in
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sec:Location-analysis"
-
- \end_inset
-
- a lot of existing research into identifying interesting places relied on
- the fact that with hardware that is now 5-10 years old, you could not reliably
- get a GPS signal indoors.
- Thus whenever the user remained somewhere without a GPS signal it was likely
- that they were spending time indoors, and therefore their current location
- would be noteworthy.
- \end_layout
-
- \begin_layout Standard
- Unfortunately, modern GPS hardware is much more sensitive and can quite
- easily get a signal indoors in most circumstances.
- One possible solution to this was to monitor the strength of either the
- GPS lock or the GSM signal, and attempt to determine whether or not a differenc
- e was noticeable.
- An experiment was therefore conducted to record the GPS and GSM status
- for multiple indoor and outdoor locations.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float table
- placement bh
- wide false
- sideways false
- status collapsed
-
- \begin_layout Plain Layout
- \begin_inset Tabular
- <lyxtabular version="3" rows="9" columns="4">
- <features>
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <row>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Location
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- GSM strength
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- GPS satellites
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- GPS time to fix
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Indoors
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- -101 dBm
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 10
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- <1 sec
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Outdoors
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- -101 dBm
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 8
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- <1 sec
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Indoors
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- -71 dBm
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 6
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 2 sec
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Outdoors
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- -67 dBm
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 7
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 2 sec
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Indoors
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- -67 dBm
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 11
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- <1 sec
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Outdoors
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- -67 dBm
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 10
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 3 secs
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Indoors
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- -67 dBm
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 10
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- <1 sec
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Outdoors
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- -43 dBm
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 10
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- <1 sec
- \end_layout
-
- \end_inset
- </cell>
- </row>
- </lyxtabular>
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- GPS and GSM strengths
- \begin_inset CommandInset label
- LatexCommand label
- name "tab:GPS-and-GSM"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
-
- At four separate indoor locations, the third-party
- \noun on
- GPS Status
- \noun default
- application was used to observe the number of satellites the device was
- receiving a signal from, and the amount of time it took to acquire a fix
- on all of those satellites.
- The GSM signal strength as reported by the device's built in debugging
- tools was also recorded.
- The device was then moved outdoors to the nearest appropriate open area
- (footpath, outdoor seating area, etc), and the process was repeated.
- The results are summarised in
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "tab:GPS-and-GSM"
-
- \end_inset
-
- .
- \end_layout
-
- \begin_layout Standard
- While the indoor GSM strength is lower than the corresponding outdoor strength
- in two out of the four samples, it is still significantly stronger than
- the weakest recorded indoor or outdoor signal.
- In the other two cases the signal strength was the same for both indoors
- and outdoors.
- The GSM signal strength therefore seems to be a poor indicator of whether
- or not the user is indoors - it would have to be continually monitored
- to detect a drop in signal strength, and the (limited) experimental data
- shows that this would have a 50% false negative rate.
- The experiment does not allow us to reason about false positives, but it
- is easy to imagine that many circumstances would give rise to drops in
- signal strength - the most obvious being moving away from the cell tower.
- \end_layout
-
- \begin_layout Standard
- The GPS results show even less correlation between indoor and outdoor readings.
- In two out of the four locations, the indoor test identified more satellites
- than the outdoor test - the opposite to what would be expected.
- This could be because the indoor locations were typically above ground
- level - the extra altitude may be more beneficial to obtaining a lock than
- the obstruction of the building itself.
- It seems more likely, however, that the numbers are not correlated in any
- way, and a larger experiment would reveal it to be random variance.
- Similarly, the time taken to lock the satellites is typically very small,
- but in a few situations there is a noticeable delay.
- The location which resulted in a three second lock time was repeated after
- a thirty second pause and obtained a sub-second lock time, but the original
- data was included in the results.
- \end_layout
-
- \begin_layout Standard
- The experiment, although extremely limited in size, shows that it is unlikely
- that GSM strength or GPS metadata would be useful in determining interesting
- places.
- Alternative methods therefore had to be considered.
- \end_layout
-
- \begin_layout Section
- Detecting places by time spent
- \end_layout
-
- \begin_layout Standard
- Without information about whether or not the user is indoors, the next best
- method to detect interesting places is by monitoring the amount of time
- the user spends there.
- It stands to reason that a location where the user is only present fleetingly
- as they pass through is less important than somewhere they spend half a
- day.
- \end_layout
-
- \begin_layout Standard
- The Android operating system provides two methods of determining the user's
- location -
- \begin_inset Quotes eld
- \end_inset
-
- coarse
- \begin_inset Quotes erd
- \end_inset
-
- , which uses a cell tower and WiFi access point database, and
- \begin_inset Quotes eld
- \end_inset
-
- fine
- \begin_inset Quotes erd
- \end_inset
-
- which uses the device's GPS chipset.
- While
- \begin_inset Quotes eld
- \end_inset
-
- coarse
- \begin_inset Quotes erd
- \end_inset
-
- is less accurate than using GPS, it also uses significantly less battery
- power.
- Brief testing revealed that while GPS regularly obtained accuracies of
- below five metres,
- \begin_inset Quotes eld
- \end_inset
-
- network
- \begin_inset Quotes erd
- \end_inset
-
- location (using cell tower IDs and a built-in database) obtained accuracies
- in the region of 500 metres.
- Network location augmented with the built-in database of WiFi access point
- locations obtained accuracies in the same region as GPS.
- However, WiFi augmentation only works when the user has elected to enable
- WiFi on their device, and this puts a large drain on the battery.
- \end_layout
-
- \begin_layout Standard
- As the most important places a user typically visits will be much greater
- than 500 metres apart,
- \begin_inset Quotes eld
- \end_inset
-
- coarse
- \begin_inset Quotes erd
- \end_inset
-
- location will was used for all location-related tasks in the project.
- Because of this large inaccuracy, places could not be represented by a
- single point but must have a radius to compensate for the inaccuracy.
- Based on earlier experimentation, this radius was fixed at 500 metres.
- \end_layout
-
- \begin_layout Standard
- A new
- \begin_inset Quotes eld
- \end_inset
-
- place
- \begin_inset Quotes erd
- \end_inset
-
- is identified when the user remains within 500 metres of a point for at
- least 3 minutes.
- This figure is, hopefully, long enough to eliminate places where the user
- is temporarily held up (such as traffic lights), but short enough to include
- places the user visits but doesn't remain for a long length of time (such
- as supermarkets).
- When implementing this algorithm, care was taken to ensure that the length
- of time was defined as a constant and so could easily be changed if experimenta
- l data showed that it was either too long or too short.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Part
- \begin_inset CommandInset label
- LatexCommand label
- name "par:The-Context-Analyser"
-
- \end_inset
-
- The
- \noun on
- Context Analyser
- \noun default
- and applications
- \end_layout
-
- \begin_layout Standard
- The primary output of this project is the
- \noun on
- Context Analyser
- \noun default
- application, and several further applications which use the services exposed
- by the
- \noun on
- Context Analyser.
-
- \noun default
-
- \end_layout
-
- \begin_layout Section
- The
- \noun on
- Context Analyser
- \end_layout
-
- \begin_layout Standard
- The
- \noun on
- Context Analyser
- \noun default
- itself is an application with a single service, a single activity, and
- four content providers.
- Its purpose is to monitor the user's context, analyse it as necessary,
- and expose the data to other applications which will actually do something
- useful with it.
- It reuses components developed for the
- \noun on
- Activity Recorder
- \noun default
- application to retrieve and process accelerometer input, and a
- \noun on
- LocationMonitor
- \noun default
- class which wraps around Android's built in location services.
- Persistent data such as places is stored in a
- \noun on
- SQLite
- \noun default
- database, with logic in a custom helper class which handles creation and
- maintenance of tables and allows interaction with the database without
- exposing SQL to the rest of the application.
- \end_layout
-
- \begin_layout Subsection
- Accelerometer and location components
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float figure
- wide false
- sideways false
- status collapsed
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename uml-accel.png
- scale 50
- rotateAngle 90
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Accelerometer component class diagram
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Accelerometer-component-class"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
-
-
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Accelerometer-component-class"
-
- \end_inset
-
- shows the key components used in the activity inference portion of the
-
- \noun on
- Context Analyser.
-
- \noun default
- The
- \noun on
- accel
- \noun default
- package handles low-level collection of accelerometer readings.
- The
- \noun on
- RealAccelReader
- \noun default
- class registers itself to receive sensor events and then makes the received
- data available through a public method.
- It also handles acquiring of a wake lock as discussed in
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sub:Acquiring-data-while"
-
- \end_inset
-
- to keep the device sufficiently 'awake' to collect sensor data.
-
- \noun on
- AccelReader
- \noun default
- s are constructed by a factory so that they can be swapped out for test
- implementations if required, or when using an emulator which lacks real
- acceleration sensors.
- \end_layout
-
- \begin_layout Standard
- The
- \noun on
- Sampler
- \noun default
- class handles automatic, timed sampling of a reader.
- Once started, it starts its
- \noun on
- AccelReader
- \noun default
- and then records a sample every 50ms until it has obtained 128 samples.
- As it retrieves each sample, it computes the minimum, maximum and sum of
- both axes that are needed for classification.
- When 128 samples have been recorded, it executes the
- \noun on
- run
- \noun default
- method of a
- \noun on
- Runnable
- \noun default
- provided at construction, so the owner can retrieve the results and analyse
- them appropriately.
- \end_layout
-
- \begin_layout Standard
- The
- \noun on
- Classifier
- \noun default
- is identical to that used in both the
- \noun on
- Sensor Logger
- \noun default
- and
- \noun on
- Activity Recorder
- \noun default
- applications, and applies the K-Nearest Network algorithm to its given
- input and model.
- The
- \noun on
- ModelReader
- \noun default
- is a utility class which reads and deserialises the model bundled with
- the application.
- \end_layout
-
- \begin_layout Standard
- The
- \noun on
- Aggregator
- \noun default
- handles aggregation of a stream of classifications, smoothing out occasional
- spurious results as discussed in
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sub:Aggregating-classifications-to"
-
- \end_inset
-
- .
- The
- \noun on
- AutoAggregator
- \noun default
- is an extension of this which automatically uses a
- \noun on
- Sampler
- \noun default
- and a
- \noun on
- Classifier
- \noun default
- to obtain the classifications itself.
- As with
- \noun on
- AccelReader
- \noun default
- s, it is constructed by a factory so it can be swapped out for a stubbed
- implementation with ease.
- The factory will provide a
- \noun on
- FakeAutoAggregator
- \noun default
- if it detects it is running on the Android Emulator; this implementation
- simply cycles through a list of pre-defined activities to allow mocking
- of the entire activity inference procedure.
- \end_layout
-
- \begin_layout Standard
- Together, these components are capable of inferring and aggregating the
- user's current activity from accelerometer data.
- The factory classes facilitate injection of deterministic classes which
- can be used to test the system or to eliminate the system from any testing
- entirely.
- \end_layout
-
- \begin_layout Standard
- The location handling package consists of one interface, a factory, and
- two concrete implementations.
- The
- \noun on
- LocationMonitor
- \noun default
- interface simply specifies methods to retrieve the current latitude, longitude
- and accuracy.
- A concrete
- \noun on
- RealLocationMonitor
- \noun default
- implements this by registering for location events with Android's built
- in
- \noun on
- LocationManager
- \noun default
- service, while the
- \noun on
- FakeLocationMonitor
- \noun default
- merely cycles through a pre-defined list of latitude and longitude pairs.
- A factory class determines which implementation to return based on whether
- or not the code is being executed on an emulator.
- \end_layout
-
- \begin_layout Subsection
- The
- \noun on
- ContextAnalyserService
- \end_layout
-
- \begin_layout Standard
- The
- \noun on
- ContextAnalyserService
- \noun default
- is an Android
- \noun on
- Service
- \noun default
- that handles periodic querying of the accelerometer and location components
- described above, and other assorted tasks related to that data.
- When it starts, the service creates a new
- \noun on
- AutoAggregator
- \noun default
- , a new
- \noun on
- DataHelper
- \noun default
- , an instance of Android's built in
- \noun on
- Geocoder
- \noun default
- class, and a
- \noun on
- LocationMonitor
- \noun default
- .
- It also retrieves a list of place names which have not yet been geocoded,
- registers a listener for an application preferences setting titled
- \begin_inset Quotes eld
- \end_inset
-
- run
- \begin_inset Quotes erd
- \end_inset
-
- , and schedules its polling method to be called after a sixty second delay.
- \end_layout
-
- \begin_layout Standard
- Every sixty seconds, the service then:
- \end_layout
-
- \begin_layout Itemize
- Retrieves the current latitude and longitude from its
- \noun on
- LocationMonitor
- \end_layout
-
- \begin_layout Itemize
- Computes the distance between the last stored location and the new position
- \end_layout
-
- \begin_deeper
- \begin_layout Itemize
- If the distance is less than 500m, there is no known Place associated with
- the current location, and this location has been observed at least three
- times:
- \end_layout
-
- \begin_deeper
- \begin_layout Itemize
- Creates a new place with the latitude and longitude as a name
- \end_layout
-
- \begin_layout Itemize
- Tells the data helper to add the place to the database
- \end_layout
-
- \begin_layout Itemize
- Adds the place to the list of place names needing geocoding
- \end_layout
-
- \end_deeper
- \begin_layout Itemize
- If the distance is greater than 500m:
- \end_layout
-
- \begin_deeper
- \begin_layout Itemize
- Update the stored latitude and longitude to the new values
- \end_layout
-
- \begin_layout Itemize
- If the previous location had an associated Place, tell the data helper to
- record the visit
- \end_layout
-
- \end_deeper
- \begin_layout Itemize
- In both cases:
- \end_layout
-
- \begin_deeper
- \begin_layout Itemize
- Ask the data helper to find a Place corresponding to the new location, if
- a place is found:
- \end_layout
-
- \begin_layout Itemize
- Record the current time as the start time for this visit
- \end_layout
-
- \begin_layout Itemize
- If a place had been visited previously, tell the data helper to record a
- new journey with the activity log
- \end_layout
-
- \begin_layout Itemize
- If the place is different to the last know place, send a broadcast intent
- \end_layout
-
- \end_deeper
- \end_deeper
- \begin_layout Itemize
- Attempts to geocode any places with latitude/longitude names
- \end_layout
-
- \begin_layout Itemize
- Starts the auto aggregator
- \end_layout
-
- \begin_layout Standard
- When the auto aggregator finishes, the service retrieves the new aggregated
- classification.
- If the user is not at a known place, but has been to one in the past, the
- activity is added to the activity log and the service checks for predictions.
- If the activity is different to the last known activity, a broadcast intent
- is sent.
- \end_layout
-
- \begin_layout Standard
- Predictions work by checking for journeys which begin with similar activities
- to those recorded in the activity log.
- The data helper retrieves all known journeys originating at the user's
- last known location.
- Each journey is then analysed to determine if it is compatible with the
- current activity log.
- This involves comparing the activities in the journey to make sure that
- they're the same as those logged, and the amount of time spent doing that
- activity is reasonably close.
- The current implementation allows for a ±50% variance in the number of
- repetitions of an activity.
- The activity log is also allowed to be a subset of the journey being tested,
- as long as the subset includes the beginning of the journey (that is, the
- activity log is allowed to be incomplete).
- If the activity log is found to be compatible with the journey, the journey
- is added to a list.
- \end_layout
-
- \begin_layout Standard
- Once a list of compatible journeys has been found, they are grouped by destinati
- on and the number of times each journey was made is summed into a
- \begin_inset Quotes eld
- \end_inset
-
- score
- \begin_inset Quotes erd
- \end_inset
-
- for each destination.
- The best destination is then included in a broadcast intent, and all of
- the predicted destinations are cached for use by the predictions content
- provider.
- \end_layout
-
- \begin_layout Standard
- The
- \noun on
- ContextAnalyserService
- \noun default
- exposes a
- \noun on
- Bindable
- \noun default
- interface with methods for retrieving the current activity and any predictions.
- This is used for intra-process communication: content providers for the
- activity and predictions can
- \emph on
- bind
- \emph default
- to the service and request the data they need directly.
- Other content providers simply access the shared SQLite database themselves,
- so do not need to communicate directly with the service.
- \end_layout
-
- \begin_layout Subsection
- The public API
- \end_layout
-
- \begin_layout Standard
- The primary purpose of the
- \noun on
- ContextAnalyser
- \noun default
- application is to expose the contextual information to third-party developers
- in an easy-to-user manner.
- To cater to different types of applications, two distinct methods are provided
- that expose data: a set of
- \emph on
- broadcast intents
- \emph default
- which notify interested parties as and when a change occurs, and a collection
- of
- \emph on
- content providers
- \emph default
- that allow contextual data to be queried as it is needed.
- \end_layout
-
- \begin_layout Subsubsection*
- Broadcast Intents
- \end_layout
-
- \begin_layout Standard
- As mentioned above, the
- \noun on
- ContextAnalyserService
- \noun default
- fires broadcast intents on certain occasions, namely:
- \end_layout
-
- \begin_layout Itemize
- whenever the (aggregated) activity changes
- \end_layout
-
- \begin_layout Itemize
- whenever the place associated with the user's location changes
- \end_layout
-
- \begin_layout Itemize
- whenever predictions are calculated
- \end_layout
-
- \begin_layout Standard
- Third-party applications create
- \noun on
- BroadcastReceivers
- \noun default
- which can receive these intents.
-
- \noun on
- BroadcastReceivers
- \noun default
- can be registered in code or in the application's manifest file; in the
- latter case, their creation and maintenance is handled by the OS itself,
- so there is very little overhead in terms of memory or CPU usage for the
- application.
- Each of the broadcast intents include relevant data such as the new activity,
- new place ID, or most likely predicted destination.
- This allows applications to implement a lightweight receiver which is able
- to check conditions and launch a service or activity in response to the
- user's context.
- \end_layout
-
- \begin_layout Subsubsection*
- Content providers
- \end_layout
-
- \begin_layout Standard
- For applications which need more detailed information, or wish to poll the
- current state instead of receiving it asynchronously, the
- \noun on
- ContextAnalyser
- \noun default
- defines a set of Android content providers.
- An activity or service can query a content provider by simply providing
- its URI, and optionally a projection, selection, and custom ordering.
- In return, it receives a Cursor object which can be used to iterate over
- and retrieve all the results of the query.
- Content providers are used extensively by the Android OS, for example for
- accessing contacts, e-mail and SMS messages.
- \end_layout
-
- \begin_layout Standard
- Two content providers - journeys and places - simply pass queries directly
- on to the backend database, which retrieves data from (or modifies data
- in) the journey, journeysteps and locations tables.
- This is extremely simple to implement as the Android
- \noun on
- SQLiteDatabase
- \noun default
- class has a query method with the same signature as that implemented by
- content providers.
- \end_layout
-
- \begin_layout Standard
- A further two content providers - activities and predictions - are backed
- by data retrieved from the
- \noun on
- ContextAnalyserService
- \noun default
- via its bindable interface, as discussed previously.
- The retrieved data is added to a
- \noun on
- MatrixCursor
- \noun default
- and returned to the caller.
- These two providers, at present, do not allow the caller to specify a projectio
- n, selection arguments, or an ordering.
- These parameters are all biased towards a SQL-like model, and there is
- no simple way to apply them to a
- \noun on
- MatrixCursor.
-
- \noun default
- Some built-in Android content providers, such as the
- \noun on
- gmail-ls
- \noun default
- provider which facilitates access to the user's gmail account, also do
- not implement projection, selection or ordering; this suggests that in
- situations where the provider is not backed by a SQLite database, it is
- acceptable to just ignore these parameters.
- Of course, they would be more useful if the parameters were respected,
- so the implementation may be reconsidered in the future.
- \end_layout
-
- \begin_layout Subsubsection*
- API class
- \end_layout
-
- \begin_layout Standard
- In order to use receive intents or use content providers, developers need
- to know the URIs and key names data structures involved.
- These are published in the developer documentation (
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sec:Developer-Guide"
-
- \end_inset
-
- ), and an optional lightweight
- \begin_inset Quotes eld
- \end_inset
-
- API
- \begin_inset Quotes erd
- \end_inset
-
- is also provided to save developers having to hard code common String and
- URI values.
- This API, as discussed in the developer guide, consists of a set of nested
- public classes with public String and URI constants.
- Developers simply drop a single JAR archive or a single JAVA source file
- into their projects, and they can then access constants for the content
- provider URIs, column names for each exposed content provider, and intent
- names and metadata for broadcast intents.
- \end_layout
-
- \begin_layout Subsubsection*
- Permissions
- \end_layout
-
- \begin_layout Standard
- In order for the Context Analyser function, it has to ask the user for the
- relevant
- \emph on
- permissions
- \emph default
- to use the accelerometers, access their location, and keep the device awake.
- All of these permissions are classed as
- \begin_inset Quotes eld
- \end_inset
-
- dangerous
- \begin_inset Quotes erd
- \end_inset
-
- and are flagged to the user when they install the application.
- The Android OS enforces access control based on permissions, and will cause
- runtime exceptions to be thrown if applications attempt to access a resource
- they do not have access to.
- \end_layout
-
- \begin_layout Standard
- In order to protect users' privacy, the Context Analyser defines its own
- set of permissions which third-party applications must request in order
- to retrieve context information.
- These permissions are all designated
- \begin_inset Quotes eld
- \end_inset
-
- dangerous
- \begin_inset Quotes erd
- \end_inset
-
- so that users will be aware of the information that applications are requesting.
- Without these permissions, the Context Analyser would open up a loophole
- whereby applications could retrieve location information from the Context
- API that they didn't have permission to access directly through the OS.
- The Android OS makes it extremely simple to enforce these permissions -
- in most cases a single tag is added in the application's manifest file,
- or a single method is invoked in code, and the OS handles everything else.
- \end_layout
-
- \begin_layout Standard
- One extra permission was also created which is requested by the Context
- Analyser itself.
- This permission is called
- \begin_inset Quotes eld
- \end_inset
-
- BROADCAST
- \begin_inset Quotes erd
- \end_inset
-
- and is used to ensure data integrity for third party applications.
- Applications are encouraged to check for the
- \begin_inset Quotes eld
- \end_inset
-
- BROADCAST
- \begin_inset Quotes erd
- \end_inset
-
- permission when receiving broadcast intents (and again, the Android OS
- makes this as simple as adding a tag to an element in the manifest file)
- in order to ensure that the broadcasts came from a source that the user
- trusts to make them.
- This prevents malicious third-party applications broadcasting erroneous
- data, or broadcasting high volumes of data, to negatively impact context-aware
- applications.
- \end_layout
-
- \begin_layout Section
- Places application
- \end_layout
-
- \begin_layout Standard
- The
- \begin_inset Quotes eld
- \end_inset
-
- places
- \begin_inset Quotes erd
- \end_inset
-
- application consists of a single activity which shows an Android
- \noun on
- MapView
- \noun default
- , with two custom overlay layers.
- One layer renders a star at the latitude/longitude of each place known
- to the
- \noun on
- Context Analyser
- \noun default
- , while the second layer renders red lines between places that are connected
- by journeys.
- The thickness of the line is proportionate to the number of times the journey
- has been undertaken.
- \end_layout
-
- \begin_layout Standard
- The application retrieves its data from two of the Context Analyser's content
- providers.
- For each location returned by the places content provider, the application
- creates a new
- \noun on
- OverlayItem
- \noun default
- containing the latitude/longitude, name, and a summary of the statistics
- associated with the place.
- The corresponding overlay shows a new
- \emph on
- toast
- \emph default
- containing the name and statistics when the user clicks on or near the
- overlay item (see
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Place-details"
-
- \end_inset
-
- ).
- \end_layout
-
- \begin_layout Standard
- The journeys overlay constructs a 2-dimensional map of
- \noun on
- OverlayItems
- \noun default
- to
- \noun on
- OverlayItems
- \noun default
- to the number of times that journey has been performed (i.e.,
- \noun on
- Map<OverlayItem, Map<OverlayItem, Integer>>
- \noun default
- ).
- It is passed a list of items created based on the places content provider,
- and then retrieves all known journeys from the journeys content provider
- and uses them to build the map.
- Journeys are normalised so that the ID of the start point is always less
- than the ID of the end point as the overlay is not concerned with direction.
- \end_layout
-
- \begin_layout Standard
- As each
- \noun on
- OverlayItem
- \noun default
- holds the latitude and longitude of the point, it is therefore trivial
- to iterate over each pair of items, request the
- \noun on
- MapView
- \noun default
- translate the latitude/longitude into screen co-ordinates, and render a
- line between the two points.
- The line width is set such that the most traveled journey is 10 pixels
- wide, and all other journeys are scaled in proportion.
- \end_layout
-
- \begin_layout Section
- Locale plugin
- \end_layout
-
- \begin_layout Standard
- The locale plugin is a lightweight application which connects the
- \noun on
- Context Analyser
- \noun default
- to the third-party
- \noun on
- Locale
- \noun default
- software, which is designed to allow users to change settings of their
- device automatically when certain
- \begin_inset Quotes eld
- \end_inset
-
- situations
- \begin_inset Quotes erd
- \end_inset
-
- are encountered.
- By default, situations can include location, time, battery power, orientation
- and contact information.
- Many additional plugins are available on the Android Market to augment
- these conditions.
- The plugin for the Context Analyser allows users to add conditions for
- their current activity and (most likely) predicted destination.
- \end_layout
-
- \begin_layout Standard
- In order to show new conditions in
- \noun on
- Locale
- \noun default
- , the plugin simply has to define an activity which can handle a certain
- predefined intent.
- One such activity is created for each condition, and they simply provide
- a lightweight user interface to allow the user to select the options for
- the condition.
- The activity for selecting a destination, for example, queries the places
- content provider and displays the result in a combobox.
- The user then selects the desired place, and either presses their back
- button, or presses menu and taps
- \begin_inset Quotes eld
- \end_inset
-
- Save
- \begin_inset Quotes erd
- \end_inset
-
- (this is a slightly odd user interface, but it is a standard amongst
- \noun on
- Locale
- \noun default
- plugins and highly recommended by the
- \noun on
- Locale
- \noun default
- developers).
- \end_layout
-
- \begin_layout Standard
- A broadcast receiver is then created which responds to queries from
- \noun on
- Locale.
-
- \noun default
- It does this by querying the prediction and activity content providers,
- and comparing the values they return with the values previously supplied
- for the condition by the user (these are stored in an Intent's
- \emph on
- extra
- \emph default
- fields, which are provided to the receiver by
- \noun on
- Locale
- \noun default
- ).
- It then sets a result code to indicate whether or not the situation is
- satisfied at present
- \end_layout
-
- \begin_layout Standard
- The broadcast receiver also listens for intents from the content analyser,
- and sends a special intent to
- \noun on
- Locale
- \noun default
- to suggest that it should requery the plugin.
- This allows
- \noun on
- Locale
- \noun default
- to be aware of when conditions change, and adjust its schedule appropriately.
- This workflow also allows
- \noun on
- Locale
- \noun default
- to govern how often the conditions are queried, which allows it to reduce
- the impact on battery life.
- \end_layout
-
- \begin_layout Section
- Context-aware Home Screen
- \end_layout
-
- \begin_layout Standard
- The context-aware home screen took a substantial amount of development time.
- It is a replacement for the stock Android 'home' screen which not only
- gives the user access to their applications and contacts, but displays
- recent e-mails, text messages, upcoming appointments and missed calls.
- In addition to this, it learns and adapts to the user's behaviour in a
- context-sensitive fashion.
- \end_layout
-
- \begin_layout Standard
- The context-aware home screen consists of a set of
- \begin_inset Quotes eld
- \end_inset
-
- modules
- \begin_inset Quotes erd
- \end_inset
-
- which each take up a small portion of the screen real estate.
- Each module displays one or more actionable items, such as a set of application
- shortcuts, an e-mail message, or a missed call.
- The home screen supports a number of
- \begin_inset Quotes eld
- \end_inset
-
- fixed
- \begin_inset Quotes erd
- \end_inset
-
- modules which are displayed at the top of the screen, and a set of other
- modules which are displayed below and may be scrolled vertically.
- This allows important or frequently used modules such as application shortcuts
- to be visible regardless of the other information displayed.
- \end_layout
-
- \begin_layout Standard
- Each module is expected to tailor its behaviour to the user's current context,
- either by ordering its contents appropriately, or selectively displaying
- the most relevant content.
- For example, the application shortcut module will order the shortcuts by
- those it anticipates will be most likely to be used in the present context,
- whereas an e-mail module will chose to display the e-mail messages most
- likely to be read.
- In addition, modules which aren't fixed are ordered by the home screen
- according to the context and previous history.
- \end_layout
-
- \begin_layout Standard
- The current context is represented as a set of tuples of context type and
- value.
- For example, a complete description of a context may be:
- \end_layout
-
- \begin_layout LyX-Code
- (location,1),
- \end_layout
-
- \begin_layout LyX-Code
- (destination,2),
- \end_layout
-
- \begin_layout LyX-Code
- (activity,CLASSIFIED/WALKING),
- \end_layout
-
- \begin_layout LyX-Code
- (day,Monday),
- \end_layout
-
- \begin_layout LyX-Code
- (hour,14),
- \end_layout
-
- \begin_layout LyX-Code
- (period,Afternoon)
- \end_layout
-
- \begin_layout Standard
- When the user performs an action, a tuple consisting of the module name
- and a type and identifier for the action is created.
- It is then recorded against each tuple in the current context; so if the
- user tapped an e-mail with the label
- \begin_inset Quotes eld
- \end_inset
-
- work
- \begin_inset Quotes erd
- \end_inset
-
- in the above context, some of the generated tuples would be:
- \end_layout
-
- \begin_layout LyX-Code
- (email,label,work,location,1),
- \end_layout
-
- \begin_layout LyX-Code
- (email,label,work,destination,2),
- \end_layout
-
- \begin_layout LyX-Code
- (email,label,work,activity,CLASSIFIED/WALKING),
- \end_layout
-
- \begin_layout LyX-Code
- ...
- \end_layout
-
- \begin_layout LyX-Code
- (email,label,work,period,Afternoon)
- \end_layout
-
- \begin_layout Standard
- Such an event would also cause similar data to be logged for the sender
- of the e-mail and the read state.
- A helper class is provided by the home screen activity to each module to
- facilitate storing and querying of such tuples.
- On the database level, each tuple is associated with a
- \emph on
- count
- \emph default
- - the number of times it has been generated by an event.
- \end_layout
-
- \begin_layout Standard
- When a module is deciding how to arrange or select its contents, it queries
- for all tuples which match the current context.
- It can then sum the number of times each action occurred in a related context,
- and use this score in its selection or ordering algorithm.
- The same algorithm is applied to the ordering of modules on the home screen
- itself - each interaction is recorded as a tuple of
- \noun on
- (homescreen, activity, <module>).
- \end_layout
-
- \begin_layout Standard
- Some actions the user performs may be universal, rather than tied to a specific
- context.
- For example, a user is more likely to tap on an
- \emph on
- unread
- \emph default
- e-mail to read it than to tap an e-mail they've already seen.
- To compensate for this fact, a special context provider was introduced
- which constantly provides the tuple
- \noun on
- (global, true).
-
- \noun default
- This allows modules to seamlessly incorporate the total number of times
- an action was performed into their algorithms.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Part
- \begin_inset CommandInset label
- LatexCommand label
- name "par:Evaluation"
-
- \end_inset
-
- Evaluation
- \end_layout
-
- \begin_layout Standard
- This section contains exerts from the project specification and an evaluation
- of how well the goals were met.
- \end_layout
-
- \begin_layout Section
- Activity classification
- \end_layout
-
- \begin_layout Quote
- The classifier should be able to classify the following activities: walking,
- running, standing, sitting, traveling in a vehicle.
- ...
- It is expected that the classifier should correctly classify all activities
- with an accuracy of at least 70%, within 30 seconds of the activity being
- started.
- \end_layout
-
- \begin_layout Standard
- The activity inference component of the context analyser is able to uniquely
- identify all of the activities stated in the specification, with the exception
- of running.
- In addition, it can distinguish between traveling by car and bus, and walking
- up or down stairs.
- Of over 1,000 data samples submitted by users, not a single one was described
- as
- \begin_inset Quotes eld
- \end_inset
-
- running
- \begin_inset Quotes erd
- \end_inset
-
- , which suggests that the omission has not negatively impacted the project
- in any way.
- \end_layout
-
- \begin_layout Standard
- The accuracy of the classifier when presented with supported activities
- is over 75% (see
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sub:Market-and-user"
-
- \end_inset
-
- ).
- This was all accomplished by using just two features extracted from two
- axes of the accelerometer; typical research applications that achieve similar
- accuracies often use hundreds of features and combine many different sensors.
- \end_layout
-
- \begin_layout Standard
- The timescale for activity detection was consciously expanded during this
- project.
- To conserve battery life, polling was reduced to once a minute, and the
- aggregation of results adds a further delay to activities being classified.
- Brief tests with the context analyser suggest that activities take 2-3
- minutes to be correctly identified.
- The change in timescale reflects a shift in aims from enabling applications
- to respond instantaneously to user activity (of which there are few genuine
- use cases) to facilitating a less obvious background enhancement of application
- s, as seen in the context home screen application.
- \end_layout
-
- \begin_layout Section
- Experimentation
- \end_layout
-
- \begin_layout Quote
- The results of the experimentation described should be written up as a report.
- The reports must include the data collected in each of the experiments,
- the conclusions drawn from those, and the impact of the results of the
- experiment on the project deliverables.
- \end_layout
-
- \begin_layout Standard
- Several experiments were performed as part of the project.
- These include investigating Bluetooth ubiquity (
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sec:Bluetooth-1"
-
- \end_inset
-
- ) and methods of determining whether or not a device is indoors (
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sec:Use-of-GPS/GSM"
-
- \end_inset
-
- ).
- Consideration was also given to the use of data from a camera input (
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sec:Camera"
-
- \end_inset
-
- ), and functioning code was developed to use a Microphone input (
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sec:Microphone"
-
- \end_inset
-
- ).
- \end_layout
-
- \begin_layout Standard
- Ultimately, none of these experiments contributed positively to the end
- product.
- The experimentation did, however, save development time which would have
- been spent on features that would probably have not helped the project.
- The lack of positive results, while acceptable according to the specification,
- suggests that other areas should have been considered or alternative approaches
- attempted.
- Some possibilities for these are discussed in
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sec:Future-work"
-
- \end_inset
-
- .
- \end_layout
-
- \begin_layout Section
- Deliverables
- \end_layout
-
- \begin_layout Quote
- The following items should be delivered: ...
- Context-aware Framework, ...
- Activity condition for Locale, ...
- Context-aware home screen.
- \end_layout
-
- \begin_layout Standard
- A total of four (final) applications were delivered, along with two applications
- used during the development process.
- All three applications required by the specification were successfully
- implemented, along with the
- \begin_inset Quotes eld
- \end_inset
-
- Places
- \begin_inset Quotes erd
- \end_inset
-
- application which exposes some functionality of the context API which would
- otherwise be hidden from the user.
- \end_layout
-
- \begin_layout Quote
- The application should provide two different interfaces to retrieve the
- user's context.
- The first should be an implementation of the Android ContentProvider interface.
- The second interface should use Android broadcast Intents to notify any
- interested application whenever the user's activity changes.
- \end_layout
-
- \begin_layout Standard
- The API provided by the Context Analyser exposes a total of four content
- providers, and makes use of three different broadcast intents.
- These are employed by the Places application, Locale plugin, and context
- home screen.
- The two methods compliment each other and facilitate two different methods
- of interfacing very well.
- \end_layout
-
- \begin_layout Section
- Testing
- \end_layout
-
- \begin_layout Quote
- Throughout the development of the project, unit tests should be created
- to test key functionality of all applications.
- It is expected that at the completion of the project, all unit tests should
- pass successfully, and they will have a code coverage of 80% or above.
- \end_layout
-
- \begin_layout Standard
- While unit tests were employed throughout the project, the emphasis was
- on testing small parts of complex or potentially unstable code, and code
- which was not easily covered by systems tests.
- Tests were split between those ran on a standard JVM from the development
- environment, and those that needed to be ran on the device itself with
- an Android-specific test harness.
- While no figure for code coverage is available due to this split, and due
- to lack of coverage tools for the latter type of tests, it is expected
- that the figure would be well below 80% line coverage.
- \end_layout
-
- \begin_layout Standard
- This represents a failure to adhere to Test-Driven Development (TDD) as
- originally intended (but not documented).
- This involves writing unit tests as a form of
- \begin_inset Quotes eld
- \end_inset
-
- specification
- \begin_inset Quotes erd
- \end_inset
-
- before implementing the unit itself.
- With this project, however, a lot of code started out as small
- \begin_inset Quotes eld
- \end_inset
-
- experiments
- \begin_inset Quotes erd
- \end_inset
-
- to determine whether or not something would work, or the exact output of
- some built-in functionality; it then evolved into a full implementation,
- and adding unit tests after the fact was not considered a high priority
- for most code.
- \end_layout
-
- \begin_layout Quote
- The classifier application should also have a suite of system tests.
- These should consist of a set of fake or pre-recorded inputs which are
- fed into the application in place of raw sensor data.
- The output of the classifier can then be compared to expected output for
- the data.
- \end_layout
-
- \begin_layout Standard
- The input sources for the framework are all located behind factory classes.
- These classes are able to switch out the real information for a stubbed
- version which simulates the data being received; this is automatically
- done if the application is ran on the Android Emulator, which does not
- emulate sensor inputs of any kind.
- The stubbed classes allow for easy testing of the context framework and
- the applications that use it, which makes for verification of the whole
- system extremely easy.
- \end_layout
-
- \begin_layout Section
- User testing and feedback
- \end_layout
-
- \begin_layout Quote
- The Locale addon and context-aware home screen should be subject to user
- acceptance testing for evaluation.
- This should take the form of providing the applications to multiple end
- users, allowing them to use them for a period of time (providing instructions
- for certain tasks to complete).
- The users should then be presented with a questionnaire which they can
- use to evaluate the functionality, utility and design of the applications.
- ...
- In addition to providing the applications to a closed set of users, the
- applications should be published to the Android market.
- \end_layout
-
- \begin_layout Standard
- All four
- \noun on
- Context Analyser
- \noun default
- applications were given to a small group of test users, along with copies
- of the user manuals and developer's guide.
- No questionnaires were used, but the users were asked to give feedback
- and evaluate.
- Both of the preliminary data gathering applications were published to the
- Android Market where they received comments and ratings by users.
- At the time of writing, the
- \noun on
- Context Analyser
- \noun default
- suite had not yet been published to the market.
- \end_layout
-
- \begin_layout Standard
- The two test applications published to the market, which were never intended
- to be particularly valuable to end users, had between 100 and 500 downloads,
- and both received an average rating between 3 and 4 stars (annotated as
-
- \begin_inset Quotes eld
- \end_inset
-
- Average
- \begin_inset Quotes erd
- \end_inset
-
- and
- \begin_inset Quotes eld
- \end_inset
-
- Above Average
- \begin_inset Quotes erd
- \end_inset
-
- within the Market UI, respectively).
- Some positive comments were left, such as the following comment regarding
- the Sensor Logger application:
- \end_layout
-
- \begin_layout Quote
- It works on myTouch3G but it would be better if it ran in background and
- actually kept a log of what you do throughout the day.
- At least it was right!
- \end_layout
-
- \begin_layout Standard
- Negative feedback mostly revolved around activities which the applications
- were not trained for being incorrectly classified.
- As evidenced with the annotated data which was submitted, a lot of users
- attempted to get the application to classify them sleeping, and were presented
- with seemingly bizarre results such as
- \begin_inset Quotes eld
- \end_inset
-
- Traveling by bus
- \begin_inset Quotes erd
- \end_inset
-
- .
- This is because one sample for traveling by bus was close to a
- \begin_inset Quotes eld
- \end_inset
-
- stationary
- \begin_inset Quotes erd
- \end_inset
-
- reading - a vertical acceleration of 9.8m/s, no horizontal acceleration,
- and little variance.
- \end_layout
-
- \begin_layout Standard
- Methods to correct or detect this type of erroneous result would have given
- a much better user experience, and reduced the small amount of negative
- feedback received, but no such methods were attempted during this project.
- This was because early testing ignored activities which the classifier
- did not know of, and realisation of the scope of the problem came too late
- into the project to make the changes necessary.
- Some ideas for combating this problem are presented in
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sec:Future-work"
-
- \end_inset
-
- .
- \end_layout
-
- \begin_layout Standard
- \begin_inset Note Note
- status open
-
- \begin_layout Plain Layout
- Resource usage
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Part
- \begin_inset CommandInset label
- LatexCommand label
- name "par:Conclusion"
-
- \end_inset
-
- Conclusion
- \end_layout
-
- \begin_layout Section
- Project outcomes
- \end_layout
-
- \begin_layout Standard
- A context-aware API has been developed for the Android platform.
- This was the primary purpose and output of this project, and it has been
- evaluated to perform to an acceptable accuracy.
- While not all of the evaluation targets were met, a number of these were
- conscious decisions to deviate from the previous specification in response
- to a change in development method or change in target audience.
- \end_layout
-
- \begin_layout Standard
- In developing the API, an algorithm to classify accelerometer data using
- an extremely small set of extracted features was devised.
- This is a significant deviation from established works in the field, which
- mostly attempt to use as many features as possible in an attempt to increase
- accuracy.
-
- \end_layout
-
- \begin_layout Standard
- In addition to the main API, the project has also delivered a set of application
- s built on top of it, most notably the context aware home screen.
- This clearly demonstrates how context-aware systems can enhance a user's
- experience by tailoring content and behaviour to the current context.
- \end_layout
-
- \begin_layout Section
- Future work
- \begin_inset CommandInset label
- LatexCommand label
- name "sec:Future-work"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- There are many areas in this project which could be expanded on or enhanced
- in some way.
- Some of these are discussed below.
- \end_layout
-
- \begin_layout Subsection
- Using GSM metadata to enhance activity classification
- \end_layout
-
- \begin_layout Standard
- While experiments with using GSM and GPS signal strength to determine interestin
- g locations were unsuccessful, there is a possibility that some GSM data
- can be used in order to augment the existing activity classification system.
- In order to promptly hand off communications to alternative cell sites
- when the user moves around, all mobile telephones track the cell IDs and
- signal strengths of their
- \emph on
- neighbouring
- \emph default
- cell towers as well as the current one.
- \end_layout
-
- \begin_layout Standard
- It is possible that measuring the rate of change in either the strength
- of neighbouring cell towers, or indeed the change in cell towers themselves,
- could be used to infer the approximate speed the user is traveling at.
- While this could be a piece of standalone contextual information, it would
- be possible to integrate this with the activity inference system to help
- reduce incorrect results.
- \end_layout
-
- \begin_layout Standard
- As discussed earlier, a large percentage of incorrectly classified samples
- involved the user sitting down and being misclassified as being in a vehicle.
- A simple decision tree could be implemented that biased the activity inference
- algorithm to favour the
- \begin_inset Quotes eld
- \end_inset
-
- sitting
- \begin_inset Quotes erd
- \end_inset
-
- classification over vehicle-based ones if the user was not moving at speed.
- This has the potential to increase accuracy to the region of 90%.
- \end_layout
-
- \begin_layout Subsection
- Automatic classification of places
- \end_layout
-
- \begin_layout Standard
- While the context analyser correctly identifies interesting places, it would
- be useful to know what type of place they were.
-
- \begin_inset Quotes eld
- \end_inset
-
- Home
- \begin_inset Quotes erd
- \end_inset
-
- and
- \begin_inset Quotes eld
- \end_inset
-
- Work
- \begin_inset Quotes erd
- \end_inset
-
- could potentially be inferred by the times of day spent at each location;
- interchanges could be identified by the duration of visits and the activity
- involved in getting to and from the location, etc.
- \end_layout
-
- \begin_layout Standard
- This would enhance the behaviour of contextual location-aware services,
- which currently have to rely on analysing the user's activity (either their
- real life activity or their interactions with the phone) in order to correctly
- adapt their behaviour to places.
- Instead of observing that a user frequently reads e-mails at place #17,
- an application could infer that as place #17 is a work place, the user
- is more likely to want to read e-mail than play games.
- \end_layout
-
- \begin_layout Subsection
- On-device training for new activities
- \end_layout
-
- \begin_layout Standard
- Because it uses an instance-based learning algorithm, it would be very easy
- to add new samples to the activity classification model on the device itself.
- However, there are various challenges which would make this more difficult.
- At present the model data is stored in a binary file bundled with the Context
- Analyser; this means that it is not modifiable at runtime.
- In order to integrate new data, it would either have to be extracted to
- storage on the device and then modified, or imported into a database.
- \end_layout
-
- \begin_layout Standard
- In addition, it would be hard to ensure that data entered on the device
- was of a good quality.
- Without a way to explore the model itself, the user has no way of finding
- and correcting or deleting poor quality training samples which lead to
- false classifications.
- Finally, removing the developer from the update process means that new
- activities have to be added by each and every user, instead of added once
- by the developer and shared to all users.
- Further work on this topic would have to explore ways to allow users to
- add high quality data, and then ensure that data is shared appropriately.
- \end_layout
-
- \begin_layout Subsection
- \begin_inset Quotes eld
- \end_inset
-
- Omniscient
- \begin_inset Quotes erd
- \end_inset
-
- context home screen
- \end_layout
-
- \begin_layout Standard
- The present context home screen only records what happens when the user
- directly interacts with it.
- Further work could expand this to make the home screen aware of all actions
- that were performed on the device, and to incorporate these into the dashboard
- to further improve the user experience.
- \end_layout
-
- \begin_layout Standard
- An obvious example of this is monitoring outgoing phone calls, which can
- be invoked from a multitude of applications without directly tapping the
- contact on the home screen.
- At present, the home screen sees a tap on the
- \begin_inset Quotes eld
- \end_inset
-
- Dialer
- \begin_inset Quotes erd
- \end_inset
-
- application (for example) and nothing else; if it monitored phone calls
- and other activities it could also make the contact involved more prominent
- on the home screen.
- \end_layout
-
- \begin_layout Standard
- Another use would be monitoring the time spent in applications (rather than
- just the number of launches), and which activities within those are accessed.
- If a user repeatedly opens the market application to browse to the most
- recently added games, the context home screen may be able to detect that
- behaviour and automatically add a
- \emph on
- new
- \emph default
- shortcut which performs this action automatically for them.
- Work would need to be done in order to determine whether or not this was
- possible in a general case for any application.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Part
- Appendices
- \end_layout
-
- \begin_layout Section
- \start_of_appendix
- User Guide - Context Analyser
- \end_layout
-
- \begin_layout Standard
- Welcome to the
- \noun on
- Context Analyser
- \noun default
- .
- This application analyses your
- \emph on
- context
- \emph default
- as you carry your phone around with you performing day-to-day activities.
- Other applications can query your context information and enhance their
- behaviour so that they're more relevant to what you're doing.
- \end_layout
-
- \begin_layout Standard
- The context analyser currently provides the following context information:
- \end_layout
-
- \begin_layout Itemize
- Your activity
- \end_layout
-
- \begin_layout Itemize
- Your location
- \end_layout
-
- \begin_layout Itemize
- Your predicted destination, if you're not at a known location
- \end_layout
-
- \begin_layout Standard
- It does this by gathering data from your phone's accelerometers and location
- provider.
- Data is recorded for a few seconds once a minute, to preserve your battery
- life.
- \end_layout
-
- \begin_layout Standard
- For your 'activity', the context analyser tries to detect whether you are
- walking, sitting, standing, or in a vehicle.
- It can also expand on these to detect the difference between a car and
- a bus, and walking normally and walking up or down stairs.
- Future updates may add more activities.
- \end_layout
-
- \begin_layout Standard
- For your location and destination, the context analyser deals in 'places'.
- These are locations up to 500m wide where you have spent several minutes
- not moving.
- A place could correspond to your home, office, favourite coffee shop or
- a bus stop you frequently wait at.
- When you move between places, the context analyser notes which activities
- it thought you were performing, and stores these as a 'journey' which links
- the two places.
- When you next set off from one of these, it can compare your activities
- and see if it can guess where you're heading.
- \end_layout
-
- \begin_layout Standard
- There is very little you can do with the context analyser on its own.
- It's built as a tool for other applications to hook into.
-
- \begin_inset Float figure
- wide false
- sideways false
- status collapsed
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename contextanalyser-featured.png
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Featured applications
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Featured-applications"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
- You can see some of these featured applications listed when you open the
- context analyser (see
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Featured-applications"
-
- \end_inset
-
- ) .
- Simply click on one of them and the Android market will open for you to
- view or install your chosen app.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float figure
- wide false
- sideways false
- status collapsed
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename contextanalyser-menu.png
-
- \end_inset
-
-
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Disable service button
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Disable-service-button"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
- The context analyser will run a background service as soon as you open the
- application, or whenever another application requests data from it.
- If you wish to disable the background service (which will stop the context
- analyser from detecting places or determining your activity), press the
-
- \noun on
- menu
- \noun default
- button and select the
- \noun on
- Disable service
- \noun default
- option (see
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Disable-service-button"
-
- \end_inset
-
- ).
- The background service will not run until you repeat the procedure and
- select
- \noun on
- Enable service
- \noun default
- .
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Section
- User Guide - Places
- \end_layout
-
- \begin_layout Standard
- The
- \noun on
- places
- \noun default
- application shows you all of the places detected by the
- \noun on
- Context Analyser
- \noun default
- , and the journeys you make in between them.
- The
- \noun on
- Context Analyser
- \noun default
- is a tool which tries to determine your current activity and location,
- and your destination if you're on the move.
- If you don't have the
- \noun on
- Context Analyser
- \noun default
- installed, you'll be prompted to install it from the market.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float figure
- wide false
- sideways false
- status collapsed
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename places-normal.png
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Places application
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Places-application"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
-
- The places application displays a map and marks each detected place with
- an orange star.
- Places you've traveled between are connected with a red line - the thicker
- the line, the more frequently you make that journey.
- In
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Places-application"
-
- \end_inset
-
- , you can see two places with a very frequently made journey between them.
- \end_layout
-
- \begin_layout Standard
- You can pan the map by dragging it around with your finger, or by moving
- your phone's trackball (if it has one).
- To zoom in and out, tap the screen and wait two seconds and the zoom controls
- will appear at the bottom of the map.
- Simply tap either button to zoom in or out.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float figure
- wide false
- sideways false
- status collapsed
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename places-toast.png
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Place details
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Place-details"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
-
- To see more information about a place, simply tap on its star.
- A small
- \emph on
- toast
- \emph default
- will appear giving you the name of the place, the number of visits, and
- the date and time of your last visit.
- Names are determined automatically by geocoding the latitude and longitude
- to a nearby place name - this could be the name of a street, a nearby landmark
- or a side alley.
-
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Place-details"
-
- \end_inset
-
- shows the result of tapping one of the stars - the name of the place is
-
- \begin_inset Quotes eld
- \end_inset
-
- Rose Alley
- \begin_inset Quotes erd
- \end_inset
-
- , it has been visited 37 times and the last time this happened was in the
- early hours of July the 10th.
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Section
- User Guide - Locale plugin
- \end_layout
-
- \begin_layout Standard
- The
- \noun on
- Context Analyser
- \noun default
- plugin for
- \noun on
- Locale
- \noun default
- allows you to create
- \noun on
- Locale
- \noun default
- situations based on information provided by the
- \noun on
- Context Analyser
- \noun default
- .
-
- \noun on
- Locale
- \noun default
- is an application which allows you to make your phone change settings,
- send tweets, or perform a variety of other actions, whenever a certain
- 'situation' occurs.
- A situation is just a set of conditions - such as your location, your phone's
- battery life, or the current time.
- The
- \noun on
- Context Analyser
- \noun default
- application automatically determines your current activity (such as 'walking'
- or 'sitting down'), and your predicted destination if you're traveling.
- This plugin requires that you have both
- \noun on
- Context Analyser
- \noun default
- and
- \noun on
- Locale
- \noun default
- installed.
- Both are available from the Android market.
- \end_layout
-
- \begin_layout Standard
- The plugin adds two new conditions which you can use in
- \noun on
- Locale
- \noun default
- situations:
- \end_layout
-
- \begin_layout Itemize
- Activity - the activity you are
- \emph on
- most likely
- \emph default
- performing
- \end_layout
-
- \begin_layout Itemize
- Destination - your
- \emph on
- most likely
- \emph default
- destination, if you're not at a known location
- \end_layout
-
- \begin_layout Standard
- A basic overview of adding these new conditions follows.
- For full documentation on how to use
- \noun on
- Locale
- \noun default
- , consult the
- \noun on
- Locale
- \noun default
- user manual.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float figure
- wide false
- sideways false
- status collapsed
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename locale-situations.png
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Locale main screen
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Locale-main-screen"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
-
- When you open
- \noun on
- Locale
- \noun default
- , you will see a list of currently defined situations (
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Locale-main-screen"
-
- \end_inset
-
- ).
- You can edit existing situations by tapping on them.
- Existing situations may be deleted by clicking on the red minus button
- to the right of the situation name.
- Finally, new situations can be created by tapping the 'Add Situation' button
- at the bottom of the screen.
-
- \noun on
- Locale
- \noun default
- shows any situations that are
- \emph on
- active
- \emph default
- (all the conditions currently hold true) in bold.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float figure
- wide false
- sideways false
- status collapsed
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename locale-situation-pre.png
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Locale editing situation
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Locale-editing-situation"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
-
-
- \begin_inset Float figure
- wide false
- sideways false
- status collapsed
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename locale-add-condition.png
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Locale add condition popup
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Locale-add-condition"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
-
- Once you've selected a situation to edit, or created a brand new situation,
- you will see
- \noun on
- Locale
- \noun default
- 's 'edit situation' screen (
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Locale-editing-situation"
-
- \end_inset
-
- ).
- This allows you to set the name of the situation, add or edit conditions,
- and add or edit settings.
- The
- \noun on
- Context Analyser
- \noun default
- plugin adds two new conditions, which are shown in the list when you click
- 'Add condition' (
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Locale-add-condition"
-
- \end_inset
-
- ).
- Select either 'Activity' or 'Destination' to add a new condition based
- on your current context.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float figure
- wide false
- sideways false
- status collapsed
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename locale-select-destination.png
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Locale plugin selecting destination
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Locale-plugin-selecting"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
-
-
- \begin_inset Float figure
- wide false
- sideways false
- status collapsed
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename locale-select-activity.png
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Locale plugin selecting activity
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Locale-plugin-selecting-activity"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
-
- When you select one of the plugin's conditions, you will be presented with
- a screen which allows you to specify which activity (see
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Locale-plugin-selecting-activity"
-
- \end_inset
-
- ) or destination (see
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Locale-plugin-selecting"
-
- \end_inset
-
- ) you wish to match.
- For activities, you can select one of sitting, standing, walking, walking
- up stairs, walking down stairs, dancing, traveling bar car, or traveling
- by bus.
- For destination, you may select any place which the
- \noun on
- Context Analyser
- \noun default
- has previously detected.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float figure
- wide false
- sideways false
- status collapsed
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename locale-menu.png
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Locale condition editor menu
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Locale-condition-editor"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
- Once you've selected your chosen activity or destination, press the
- \noun on
- menu
- \noun default
- button and select the 'Save Changes' option (see
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Locale-condition-editor"
-
- \end_inset
-
- ).
- You will then return to the situation editor where the new condition will
- be displayed.
- You may then add settings as with any other
- \noun on
- Locale
- \noun default
- situation, and
- \noun on
- Locale
- \noun default
- will automatically apply these when all of the conditions match.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Section
- User Guide - Context Home Screen
- \end_layout
-
- \begin_layout Standard
- The
- \begin_inset Quotes eld
- \end_inset
-
- context-aware home screen
- \begin_inset Quotes erd
- \end_inset
-
- replaces your phone's normal home screen with an information rich dashboard
- which can adapt to offer different information based on your current context.
- As you use the home screen (by, for example, launching applications, opening
- e-mails, etc), the home screen remembers what you were doing, when you
- did it, and where you were at the time.
- It then applies this information to automatically make the shortcuts or
- messages it thinks you will be most interested in more prominent.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float figure
- wide false
- sideways false
- status collapsed
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename home-select.png
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Home screen selection
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Home-screen-selection"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
-
- Once the context-aware home screen is installed, pressing the
- \begin_inset Quotes eld
- \end_inset
-
- Home
- \begin_inset Quotes erd
- \end_inset
-
- key or turning on your device will prompt you as to which application you
- wish to provide the
- \begin_inset Quotes eld
- \end_inset
-
- Home
- \begin_inset Quotes erd
- \end_inset
-
- functionality, as seen in
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Home-screen-selection"
-
- \end_inset
-
- .
- Select
- \begin_inset Quotes eld
- \end_inset
-
- Context Home
- \begin_inset Quotes erd
- \end_inset
-
- to open the context home screen.
- If you want this to
- \emph on
- always
- \emph default
- open when you press home, tick the
- \begin_inset Quotes eld
- \end_inset
-
- Use by default for this action
- \begin_inset Quotes erd
- \end_inset
-
- checkbox at the bottom of the prompt before making your choice.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float figure
- wide false
- sideways false
- status collapsed
-
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename home-main.png
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- Context home screen
- \begin_inset CommandInset label
- LatexCommand label
- name "fig:Context-home-screen"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
-
- The context home screen is shown in
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "fig:Context-home-screen"
-
- \end_inset
-
- .
- The top two lines of the home screen show shortcuts for your installed
- applications and contacts who have pictures associated with them.
- You can open the application or contact information screen by tapping on
- the appropriate image.
- To scroll left or right, simply drag your finger across the shortcuts.
- You may also use your device's trackball to navigate around the screen,
- if it has one.
- \end_layout
-
- \begin_layout Standard
- The rest of the home screen shows you your recent e-mails, text messages,
- appointments, missed calls, and other information.
- You can scroll up and down in this area by dragging your finger up or down.
- Tapping on an item will open it in the relevant application.
- The context home screen will attempt to show contact pictures for each
- event where they are available; if the sender is not associated with a
- contact, or the contact has no photograph, then a white
- \begin_inset Quotes eld
- \end_inset
-
- running man
- \begin_inset Quotes erd
- \end_inset
-
- will be displayed.
- \end_layout
-
- \begin_layout Standard
- As you use the context home screen, you should notice that the applications
- you use most frequently start appearing nearer to the start of the list
- and the types of event that you click on trickle up towards the top of
- the screen.
- If you regularly call someone every Saturday evening, you should find that
- person at the top of your contacts list when you look on Saturday evening.
- The more you use the context home screen, the better it adapts to your
- needs!
- \end_layout
-
- \begin_layout Standard
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Section
- Developer Guide
- \begin_inset CommandInset label
- LatexCommand label
- name "sec:Developer-Guide"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- This guide details how you can integrate the data made available by the
-
- \noun on
- Context Analyser
- \noun default
- into your own applications.
- It is expected that you are familiar with Android application development
- and general concepts.
- For an overview of how the
- \noun on
- Context Analyser
- \noun default
- works, please consult the user guide.
- \end_layout
-
- \begin_layout Standard
- The
- \noun on
- Context Analyser
- \noun default
- exposes its data via a set of Content Providers.
- These are augmented by several broadcast intents which can be used by third
- party applications to receive immediate notification when the user's context
- changes.
-
- \end_layout
-
- \begin_layout Subsection
- Permissions
- \begin_inset CommandInset label
- LatexCommand label
- name "sub:Permissions"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- In order to protect the user's privacy, a series of permissions are defined
- by the
- \noun on
- Context Analyser
- \noun default
- , and access to data and broadcast intents is limited to applications which
- hold the appropriate permissions.
- The
- \noun on
- Context Analyser
- \noun default
- defines the following permissions:
- \end_layout
-
- \begin_layout Itemize
- uk.co.md87.android.contextanalyser.RECEIVE_UPDATES - allows the application to
- receive real-time updates about context or place information through broadcast
- intents
- \end_layout
-
- \begin_layout Itemize
- uk.co.md87.android.contextanalyser.READ_PLACES - allows the application to read
- places from the relevant content provider
- \end_layout
-
- \begin_layout Itemize
- uk.co.md87.android.contextanalyser.WRITE_PLACES - allows the application to modify
- places via the relevant content provider
- \end_layout
-
- \begin_layout Itemize
- uk.co.md87.android.contextanalyser.READ_JOURNEYS - allows the application to
- read journey information from the relevant content providers
- \end_layout
-
- \begin_layout Itemize
- uk.co.md87.android.contextanalyser.WRITE_JOURNEYS - allows the application to
- modify journey information via the relevant content providers
- \end_layout
-
- \begin_layout Itemize
- uk.co.md87.android.contextanalyser.BROADCAST - permission used when broadcasting
- context-related intents.
- Applications may wish to check that broadcasters hold this permission to
- prevent third parties broadcasting erroneous data.
- \end_layout
-
- \begin_layout Standard
- If you do not declare the required permissions, a run time error will occur
- when your application attempts to access protected data.
- All permissions listed here are defined as
- \noun on
- dangerous
- \noun default
- , which means that end users will be prompted about them when installing
- any application using them; this is in line with the underlying accelerometer
- and location permissions.
- \end_layout
-
- \begin_layout Subsection
- Model
- \end_layout
-
- \begin_layout Standard
- The
- \noun on
- Context Analyser
- \noun default
- is backed by a database containing tables for
- \emph on
- places
- \emph default
- ,
- \emph on
- journeys
- \emph default
- and
- \emph on
- journey steps
- \emph default
- .
- Activities and predictions are stored in memory.
- \end_layout
-
- \begin_layout Standard
- A
- \series bold
- place
- \series default
- is a location represented by a latitude/longitude tuple.
- Places have a radius of 500 metres; whenever a user moves to within 500
- metres of a known place, they are assumed to be located at that place.
- New places are identified when the user is observed to be in the same location
- (within 500 metres) for three consecutive readings, which occur at 1 minute
- intervals.
- Places also have an associated name, which is initially set to a string
- representation of the latitude and longitude; the
- \noun on
- Context Analyser
- \noun default
- will attempt to rename any place with such a name by geocoding the latitude/lon
- gitude into a nearby street or landmark name.
- \end_layout
-
- \begin_layout Standard
- An
- \series bold
- activity
- \series default
- is represented by a string delimited by forward slashes (
- \noun on
- /
- \noun default
- ).
- This forms a hierarchy of classifications, with the following possible
- values:
- \end_layout
-
- \begin_layout Itemize
- CLASSIFIED/DANCING
- \end_layout
-
- \begin_layout Itemize
- CLASSIFIED/IDLE/SITTING
- \end_layout
-
- \begin_layout Itemize
- CLASSIFIED/IDLE/STANDING
- \end_layout
-
- \begin_layout Itemize
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \begin_layout Itemize
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \begin_layout Itemize
- CLASSIFIED/WALKING
- \end_layout
-
- \begin_layout Itemize
- CLASSIFIED/WALKING/STAIRS/DOWN
- \end_layout
-
- \begin_layout Itemize
- CLASSIFIED/WALKING/STAIRS/UP
- \end_layout
-
- \begin_layout Standard
- It is possible for activities to contain only a part of the hierarchy -
- for example if the readings alternate between classifications for traveling
- by bus and by car, they will be aggregated and the resulting activity will
- be simply CLASSIFIED/VEHICLE
- \noun on
- .
-
- \noun default
- Similarly, if the user's activity is in constant flux, the resulting activity
- will be aggregated to simply 'CLASSIFIED'.
- \end_layout
-
- \begin_layout Standard
- A
- \series bold
- journey
- \series default
- is a recorded sequence of activities which occurred when the user moved
- from one place to another.
- Whenever the user leaves a known place, the
- \noun on
- Context Analyser
- \noun default
- begins a log of activities; when they then reach another known place, the
- log is converted into a journey.
- Each journey consists of a sequence of
- \series bold
- journey steps
- \series default
- , which describe a single activity and a number of repetitions.
- \end_layout
-
- \begin_layout Standard
- For example, if the user leaves place A, spends five minutes walking, then
- ten minutes on a bus, and arrives at place B:
- \end_layout
-
- \begin_layout Itemize
- A journey will be created with a start point of A and an end point of B
- \end_layout
-
- \begin_layout Itemize
- The journey will consist of two journey steps:
- \end_layout
-
- \begin_deeper
- \begin_layout Itemize
- Step one will have an activity of CLASSIFIED/WALKING with five repetitions
- \end_layout
-
- \begin_layout Itemize
- Step two will have an activity of CLASSIFIED/VEHICLE/BUS with ten repetitions
- \end_layout
-
- \end_deeper
- \begin_layout Standard
- When the user is on a journey, the Context Analyser compares their current
- history to that of previously recorded journeys leaving the same place.
- If any of the journeys match, their destinations are considered as
- \series bold
- predictions
- \series default
- .
- The number of times each matching journey occurred is summed and the result
- is used as a 'score' for the destination involved.
- The destination with the highest score is considered the most likely destinatio
- n for the user.
- \end_layout
-
- \begin_layout Standard
- For the purposes of prediction, a partial journey is considered to match
- a historical journey if:
- \end_layout
-
- \begin_layout Itemize
- it contains the same number of, or fewer, steps
- \end_layout
-
- \begin_layout Itemize
- each step has the same activity
- \end_layout
-
- \begin_layout Itemize
- the number of repetitions in each completed step (not the last step) is:
- \end_layout
-
- \begin_deeper
- \begin_layout Itemize
- no less than 50% of the historical value
- \end_layout
-
- \begin_layout Itemize
- no greater than 150% of the historical value
- \end_layout
-
- \end_deeper
- \begin_layout Itemize
- the number of repetitions of the last step is:
- \end_layout
-
- \begin_deeper
- \begin_layout Itemize
- no greater than 150% of the historical value
- \end_layout
-
- \end_deeper
- \begin_layout Subsection
- Broadcast intents
- \end_layout
-
- \begin_layout Standard
- The
- \noun on
- Context Analyser
- \noun default
- broadcasts three different intents to make other applications aware of
- certain events.
- Applications require the RECEIVE_UPDATES permission to receive these broadcasts
- , as discussed previously.
- These intents are:
- \end_layout
-
- \begin_layout Itemize
- uk.co.md87.android.contextanalyser.ACTIVITY_CHANGED
- \end_layout
-
- \begin_layout Itemize
- uk.co.md87.android.contextanalyser.CONTEXT_CHANGED
- \end_layout
-
- \begin_layout Itemize
- uk.co.md87.android.contextanalyser.PREDICTION_AVAILABLE
- \end_layout
-
- \begin_layout Standard
- The
- \series bold
- ACTIVITY_CHANGED
- \series default
- intent is broadcast whenever the user's activity is discovered to have
- changed.
- It contains two string extras - the old activity and the new activity -
- under the keys
- \begin_inset Quotes eld
- \end_inset
-
- old
- \begin_inset Quotes erd
- \end_inset
-
- and
- \begin_inset Quotes eld
- \end_inset
-
- new
- \begin_inset Quotes erd
- \end_inset
-
- respectively.
- \end_layout
-
- \begin_layout Standard
- The
- \series bold
- CONTEXT_CHANGED
- \series default
- intent occurs whenever some other aspect of the user's context changes.
- Presently this only includes the user's current place.
- It contains an integer extra under the key
- \begin_inset Quotes eld
- \end_inset
-
- type
- \begin_inset Quotes erd
- \end_inset
-
- which describes which type of context has changed; this will have the value
- 1 for place updates.
- Place updates will also have two further integer extras - the place the
- user was previously in (or -1 if they were not in a known place) and the
- place the user is now in - under the keys
- \begin_inset Quotes eld
- \end_inset
-
- old
- \begin_inset Quotes erd
- \end_inset
-
- and
- \begin_inset Quotes eld
- \end_inset
-
- new
- \begin_inset Quotes erd
- \end_inset
-
- , respectively.
- These place IDs can be resolved to names and latitude/longitude by querying
- the relevant content provider, described below.
- \end_layout
-
- \begin_layout Standard
- The
- \series bold
- PREDICTION_AVAILABLE
- \series default
- intent is broadcast whenever a prediction has been made by the
- \noun on
- Context Analyser
- \noun default
- .
- The best available prediction is included as a place ID in the
- \begin_inset Quotes eld
- \end_inset
-
- best_target
- \begin_inset Quotes erd
- \end_inset
-
- key, the total score for the prediction to that place is available as an
- integer in the
- \begin_inset Quotes eld
- \end_inset
-
- count
- \begin_inset Quotes erd
- \end_inset
-
- key, and the 'probability' (the score for that place divided by the total
- scores for all predicted places) is a float in the
- \begin_inset Quotes eld
- \end_inset
-
- best_probability
- \begin_inset Quotes erd
- \end_inset
-
- key.
- A full set of predictions can be retrieved from the relevant content provider,
- described below.
- \end_layout
-
- \begin_layout Standard
- As discussed in the permissions section (
- \begin_inset CommandInset ref
- LatexCommand prettyref
- reference "sub:Permissions"
-
- \end_inset
-
- ), you may wish to make sure that all broadcasts you receive are sent by
- an application which holds the BROADCAST permission.
- This ensures that the user trusts the application to send these broadcasts,
- and reduces the chance that they are from a malicious application attempting
- to introduce erroneous data or otherwise compromise your receiver.
- \end_layout
-
- \begin_layout Subsection
- Content providers
- \end_layout
-
- \begin_layout Standard
- The
- \noun on
- Context Analyser
- \noun default
- provides four content providers from which you can receive data:
- \end_layout
-
- \begin_layout Subsubsection
- Activities
- \end_layout
-
- \begin_layout Standard
- Allows querying of the user's current activity.
- This may be expanded in future versions to allow querying of all known
- activities.
- Read only, does not accept selection, projection or order parameters.
- \end_layout
-
- \begin_layout Standard
- URI:
- \noun on
- content://uk.co.md87.android.contextanalyser.activitiescontentprovider/current
- \end_layout
-
- \begin_layout Standard
- Content type:
- \noun on
- vnd.contextanalyser.activity
- \end_layout
-
- \begin_layout Standard
- Columns:
- \end_layout
-
- \begin_layout Standard
- \begin_inset Tabular
- <lyxtabular version="3" rows="2" columns="3">
- <features>
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- Name
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- Type
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- Remarks
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- activity
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- string
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- The user's current activity
- \end_layout
-
- \end_inset
- </cell>
- </row>
- </lyxtabular>
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Subsubsection
- Journeys
- \end_layout
-
- \begin_layout Standard
- Allows querying of the user's historical journeys and steps within them.
- Read/write access, supports selection and ordering.
- \end_layout
-
- \begin_layout Paragraph
- Journeys
- \end_layout
-
- \begin_layout Standard
- URI:
- \noun on
- content://uk.co.md87.android.contextanalyser.journeyscontentprovider/journeys
- \end_layout
-
- \begin_layout Standard
- Content type:
- \noun on
- vnd.contextanalyser.journey
- \end_layout
-
- \begin_layout Standard
- Columns:
- \end_layout
-
- \begin_layout Standard
- \begin_inset Tabular
- <lyxtabular version="3" rows="6" columns="3">
- <features>
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- Name
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- Type
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- Remarks
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- _id
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- long
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- A unique, persistent ID for the journey
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- start
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- long
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- The ID of the place at which this journey starts
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- end
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- long
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- The ID of the place at which this journey ends
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- steps
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- int
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- The number of steps in this journey
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- number
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- int
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- The number of times this journey has been made
- \end_layout
-
- \end_inset
- </cell>
- </row>
- </lyxtabular>
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Paragraph
- Journey steps
- \end_layout
-
- \begin_layout Standard
- URI:
- \noun on
- content://uk.co.md87.android.contextanalyser.journeyscontentprovider/steps
- \end_layout
-
- \begin_layout Standard
- Content type:
- \noun on
- vnd.contextanalyser.journeystep
- \end_layout
-
- \begin_layout Standard
- Columns:
- \end_layout
-
- \begin_layout Standard
- \begin_inset Tabular
- <lyxtabular version="3" rows="6" columns="3">
- <features>
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- Name
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- Type
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- Remarks
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- _id
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- long
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- A unique, persistent ID for the step
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- activity
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- string
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- The activity that was observed
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- repetitions
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- int
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- The number of times the activity occurred
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- journey
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- long
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- The ID of the journey that this step belongs to
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- next
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- long
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- The ID of the next step in the journey, or 0 if the last step in sequence
- \end_layout
-
- \end_inset
- </cell>
- </row>
- </lyxtabular>
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Subsubsection
- Places
- \end_layout
-
- \begin_layout Standard
- Allows querying of the user's know places.
- Read/write access, supports selection and ordering.
- \end_layout
-
- \begin_layout Standard
- URI:
- \noun on
- content://uk.co.md87.android.contextanalyser.placescontentprovider/places
- \end_layout
-
- \begin_layout Standard
- Content type:
- \noun on
- vnd.contextanalyser.location
- \end_layout
-
- \begin_layout Standard
- Columns:
- \end_layout
-
- \begin_layout Standard
- \begin_inset Tabular
- <lyxtabular version="3" rows="8" columns="3">
- <features>
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- Name
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- Type
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- Remarks
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- _id
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- long
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- A unique, persistent ID for the place
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- name
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- string
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- The name of the place
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- latitude
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- double
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- The latitude of the centre of the place
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- longitude
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- double
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- The longitude at the centre of the place
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- duration
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- long
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Amount of time in seconds spent at the place
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- times
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- long
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- The number of times the place has been visited
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- lastvisit
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- long
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- The unix timestamp of the last visit (seconds)
- \end_layout
-
- \end_inset
- </cell>
- </row>
- </lyxtabular>
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Subsubsection
- Predictions
- \end_layout
-
- \begin_layout Standard
- Allows querying of the current predictions, if any.
- Read only, does not accept selection, projection or order parameters.
- \end_layout
-
- \begin_layout Standard
- URI:
- \noun on
- content://uk.co.md87.android.contextanalyser.predictionscontentprovider/predictions
- \end_layout
-
- \begin_layout Standard
- Content type:
- \noun on
- vnd.contextanalyser.prediction
- \end_layout
-
- \begin_layout Standard
- Columns:
- \end_layout
-
- \begin_layout Standard
- \begin_inset Tabular
- <lyxtabular version="3" rows="4" columns="3">
- <features>
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <column alignment="center" valignment="top" width="0">
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- Name
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- Type
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- Remarks
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- _ID
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- long
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- A unique ID for the prediction
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- place
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- long
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- The ID of the predicted destination
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- count
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- int
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- The 'score' of the prediction
- \end_layout
-
- \end_inset
- </cell>
- </row>
- </lyxtabular>
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Subsection
- Context API
- \end_layout
-
- \begin_layout Standard
- A small
- \begin_inset Quotes eld
- \end_inset
-
- API
- \begin_inset Quotes erd
- \end_inset
-
- is available to facilitate easier access to the services exposed by the
-
- \noun on
- Context Analyser.
-
- \noun default
- This consists of the
- \noun on
- ContextApi
- \noun default
- class and its assorted subclasses.
- These subclasses contain constant values for all column names, URIs and
- content types, as well as intent names and enumeration values.
- \end_layout
-
- \begin_layout Standard
- The
- \noun on
- ContextApi.Intents
- \noun default
- class defines string constants for the three broadcast intents which are
- used by the
- \noun on
- Context Analyser
- \noun default
- .
- The
- \noun on
- ContextTypes
- \noun default
- inner class contains integer constants for the possible 'type' values for
- the CONTEXT_CHANGED intent.
- \end_layout
-
- \begin_layout Standard
- The
- \noun on
- Places
- \noun default
- ,
- \noun on
- Journeys
- \noun default
- ,
- \noun on
- JourneySteps
- \noun default
- ,
- \noun on
- Predictions
- \noun default
- and
- \noun on
- Activities
- \noun default
- classes all contain a CONTENT_URI field containing the Uri of the the content
- provider, a CONTENT_TYPE field containing the string mime type for that
- provider, and a static
- \noun on
- ColumnNames
- \noun default
- class which contains string constants for each column returned by the content
- provider.
- \end_layout
-
- \begin_layout Standard
- The following code from the
- \noun on
- Places
- \noun default
- application shows the use of these constant values:
- \end_layout
-
- \begin_layout LyX-Code
- final Cursor cursor = managedQuery(ContextApi.Places.CONTENT_URI,
- \end_layout
-
- \begin_layout LyX-Code
- new String[] { ColumnNames.LATITUDE, ColumnNames.LONGITUDE,
-
- \end_layout
-
- \begin_layout LyX-Code
- ColumnNames._ID, ColumnNames.NAME, ColumnNames.LAST_VISIT,
-
- \end_layout
-
- \begin_layout LyX-Code
- ColumnNames.VISIT_COUNT }, null, null, null);
- \end_layout
-
- \begin_layout LyX-Code
-
- \end_layout
-
- \begin_layout LyX-Code
- if (cursor.moveToFirst()) {
- \end_layout
-
- \begin_layout LyX-Code
- final int nameColumn = cursor.getColumnIndex(ColumnNames.NAME);
- \end_layout
-
- \begin_layout LyX-Code
- final int idColumn = cursor.getColumnIndex(ColumnNames._ID);
- \end_layout
-
- \begin_layout LyX-Code
-
- \end_layout
-
- \begin_layout LyX-Code
- do {
- \end_layout
-
- \begin_layout LyX-Code
- final String name = cursor.getString(nameColumn);
- \end_layout
-
- \begin_layout LyX-Code
- final int id = cursor.getInt(idColumn);
- \end_layout
-
- \begin_layout LyX-Code
- // etc
- \end_layout
-
- \begin_layout LyX-Code
- } while (cursor.moveToNext());
- \end_layout
-
- \begin_layout LyX-Code
- }
- \end_layout
-
- \begin_layout Standard
- Note that the code imports both the
- \noun on
- ContextApi
- \noun default
- class, and the
- \noun on
- ContextApi.Places.ColumnNames
- \noun default
- class.
- \end_layout
-
- \begin_layout Standard
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Section
- Extract from export of window data
- \begin_inset CommandInset label
- LatexCommand label
- name "sec:Extract-from-export"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Quote
- \noindent
- \align left
-
- \size footnotesize
- Activity: CLASSIFIED/WALKING
- \end_layout
-
- \begin_layout Quote
- \noindent
- \align left
-
- \size footnotesize
- 1264518159452:-7.804459,-1.3620348,-0.55843425,99.4375,73.3125,-32.6875, 1264518159502
- :-8.853226,-0.53119355,-0.0,100.4375,72.0625,-33.6875, 1264518159557:-11.699879,0.830841
- 2,-1.2803127,101.1875,70.8125,-32.9375, 1264518159601:-13.797412,-0.24516626,-1.1168685
- ,101.4375,70.5625,-31.9375, 1264518159652:-10.59663,-4.8760843,1.96133,102.375,71.5625,-
- 31.1875, 1264518159702:-10.528529,-5.3119354,0.6946377,102.125,71.5625,-29.6875,
- 1264518159751:-14.219643,-2.506144,2.4108016,102.375,69.5625,-28.0, 1264518159801:-9.2
- 75456,-1.2666923,1.253072,102.875,69.8125,-29.0, 1264518159852:-5.1621118,-0.7491191,0.2
- 7240697,103.125,69.8125,-30.6875, 1264518159901:-3.568531,-0.8036005,0.88532263,103.625
- ,68.5625,-31.9375, 1264518159951:-4.4810944,-0.51757324,1.253072,103.625,69.0625,-31.687
- 5, 1264518160001:-6.9191365,1.4028958,1.0487667,103.875,70.5625,-30.4375, 126451816006
- 1:-13.007432,1.3484144,0.32688835,105.0625,70.5625,-29.0, 1264518160102:-16.42614,1.2394
- 516,-0.10896278,104.375,71.3125,-27.25, 1264518160152:-15.908566,-2.3018389,-0.06810174
- ,104.625,71.0625,-27.25, 1264518160202:-9.915613,-4.780742,1.6344417,105.3125,71.0625,-2
- 9.0, 1264518160251:-10.242501,-2.465283,2.73769,105.0625,70.3125,-30.4375, 126451816030
- 1:-10.351464,-4.8897047,0.58567494,104.375,71.3125,-32.6875, 1264518160351:-7.600154,-2.
- 0294318,0.81722087,102.375,73.0625,-33.6875, 1264518160401:-6.1291566,-1.0760075,0.7218
- 784,101.1875,72.3125,-34.375, 1264518160451:-5.3936577,-1.5527196,0.3677494,101.1875,71.
- 8125,-35.625, 1264518160502:-6.101916,-1.3892754,-0.23154591,100.6875,72.0625,-35.625,
- 1264518160551:-7.2187843,-1.525479,-0.8308412,100.9375,68.0625,-36.625, 1264518160694
- :-15.227549,-2.2609777,0.6401563,101.4375,68.0625,-36.625, 1264518160697:-15.227549,-2.2
- 609777,0.6401563,101.4375,68.0625,-36.625, 1264518160701:-15.227549,-2.2609777,0.640156
- 3,101.4375,68.0625,-36.625, 1264518160752:-9.956474,-3.840938,3.405087,103.125,68.8125,-
- 36.375, 1264518160802:-12.598822,-5.298315,0.32688835,103.875,69.3125,-34.875,
- 1264518160858:-13.756551,-2.9283748,2.5333846,105.0625,69.3125,-32.6875, 126451816090
- 1:-8.962189,-1.6344417,0.9942854,105.5625,68.0625,-34.125, 1264518160951:-4.399372,-1.47
- 09976,0.54481393,104.625,68.8125,-35.875, 1264518161001:-3.050958,-1.4573772,0.58567494
- ,105.0625,68.5625,-35.875, 1264518161051:-4.5491962,0.19068487,0.6537767,105.0625,67.812
- 5,-35.375, 1264518161101:-6.7965536,1.3484144,0.87170225,105.5625,69.3125,-33.4375,
- 1264518161151:-12.993812,1.920469,1.253072,107.3125,70.3125,-30.4375, 1264518161201:-
- 16.303556,0.53119355,0.14982383,106.8125,71.0625,-29.5, 1264518161251:-14.09706,-4.75350
- 14,0.20430522,105.5625,71.0625,-29.0, 1264518161301:-10.746454,-4.971427,1.4709976,105.5
- 625,70.3125,-30.1875, 1264518161351:-11.34575,-4.0588636,1.525479,104.125,70.5625,-32.93
- 75, 1264518161401:-8.989429,-4.930566,0.88532263,103.375,70.8125,-35.125, 126451816145
- 1:-6.4560447,-2.1111538,0.47671217,101.625,71.3125,-35.125,
- \end_layout
-
- \begin_layout Standard
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Section
- Extract from ARFF representation
- \begin_inset CommandInset label
- LatexCommand label
- name "sec:Extract-from-ARFF"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @RELATION activity
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Absolute Mean (series 0)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Absolute Mean (series 1)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Absolute Mean (series 2)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Absolute Mean (series 3)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Absolute Mean (series 4)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Absolute Mean (series 5)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Maximum (series 0)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Maximum (series 1)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Maximum (series 2)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Maximum (series 3)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Maximum (series 4)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Maximum (series 5)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Mean (series 0)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Mean (series 1)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Mean (series 2)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Mean (series 3)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Mean (series 4)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Mean (series 5)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Median (series 0)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Median (series 1)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Median (series 2)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Median (series 3)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Median (series 4)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Median (series 5)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Minimum (series 0)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Minimum (series 1)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Minimum (series 2)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Minimum (series 3)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Minimum (series 4)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Minimum (series 5)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Range (series 0)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Range (series 1)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Range (series 2)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Range (series 3)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Range (series 4)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE "Range (series 5)" numeric
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @ATTRIBUTE classification {CLASSIFIED/VEHICLE/CAR, CLASSIFIED/IDLE/STANDING,
- CLASSIFIED/VEHICLE/BUS, CLASSIFIED/WALKING, CLASSIFIED/IDLE/SITTING, CLASSIFIED
- /WALKING/STAIRS/DOWN, CLASSIFIED/DANCING, CLASSIFIED/WALKING/STAIRS/UP}
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- @DATA
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- 0.44361898, 4.7165775, 8.409821, 10.608887, 10.081055, 16.005371, 5.5162406, 9.479762,
- 11.35937, 15.125, 1.4E-45, 1.4E-45, -0.44361898, 4.7165775, 8.409821, 10.608887,
- -10.081055, -16.005371, -0.19068487, 4.9169455, 8.7034025, 10.9375, -9.875, -15.6875,
- -3.8273177, 1.4437568, 3.4187074, -0.0625, -18.6875, -23.0625, 9.343558, 8.036005,
- 7.940663, 15.1875, 18.6875, 23.0625, CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- 3.9024422, 2.722155, 8.665946, 12.640137, 3.3691406, 15.688477, 1.4E-45, 4.6036777,
- 15.649779, 15.125, 1.4E-45, 1.4E-45, -3.9024422, 2.722155, 8.665946, 12.640137,
- -3.3691406, -15.688477, -3.840938, 2.7240696, 8.499097, 12.6875, -3.375, -15.6875,
- -7.518432, 1.0351465, 4.69902, 8.75,-5.875, -17.625, 7.518432, 3.5685313, 10.95076,
- 6.375, 5.875, 17.625, CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- 2.9535933, 1.9287692, 9.193417, 8.516602, 3.9960938, 16.75, 1.4E-45, 3.173541, 14.669114,
- 11.1875, 1.4E-45, 1.4E-45, -2.9535933, 1.9287692, 9.193417, 8.516602, -3.9960938,
- -16.75, -2.901134, 2.083913, 9.275456, 8.5, -3.875, -16.875, -5.0803895, 0.50395286,
- 4.6445384, 5.5625, -6.625, -18.875, 5.0803895, 2.669588, 10.024576, 5.625, 6.625,
- 18.875, CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- 3.7644293, 0.39350045, 9.493064, 4.345215, 4.4628906, 17.933105, 1.4E-45, 2.002191,
- 15.704261, 10.75, 1.4E-45, 1.4E-45, -3.7644293, 0.39350045, 9.493064, 4.345215,
- -4.4628906, -17.933105, -3.5957718, 0.50395286, 9.493382, 4.8125, -4.375, -17.875,
- -8.567199, -1.3756552, 6.006573, -2.0, -7.125, -20.5625, 8.567199, 3.3778462, 9.697687,
- 12.75, 7.125, 20.5625, CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- 1.8751402, 2.4263377, 9.45008, 0.78222656, 5.080078, 16.560059, 1.4E-45, 3.8954194,
- 9.874752, 2.625, 1.4E-45, 1.4E-45, -1.8751402, 2.4263377, 9.45008, 0.78222656,
- -5.080078, -16.560059, -1.8387469, 2.587866, 9.425281, 0.9375, -5.125, -16.625,
- -2.4789033, 1.334794, 9.220976, -1.3125, -6.625, -17.875, 2.4789033, 2.5606253,
- 0.65377617, 3.9375, 6.625, 17.875, CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \begin_layout Quotation
-
- \size footnotesize
- 1.7938437, 2.6545851, 9.423793, 0.110839844, 4.611328, 16.045898, 1.4E-45, 4.099725,
- 9.697687, 1.625, 1.4E-45, 1.4E-45, -1.7938437, 2.6545851, 9.423793, 0.110839844,
- -4.611328, -16.045898, -1.8115063, 2.7240696, 9.41166, 0.1875, -4.625, -16.125,
- -2.5333846, 1.4437568, 9.248216, -1.0625, -5.625, -17.375, 2.5333846, 2.655968,
- 0.44947147, 2.6875, 5.625, 17.375, CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \begin_layout Standard
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \end_layout
-
- \begin_layout Section
- User-annotated
- \noun on
- Sensor Logger
- \noun default
- Results
- \begin_inset CommandInset label
- LatexCommand label
- name "sec:User-annotated-Sensor-Logger"
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- \begin_inset Tabular
- <lyxtabular version="3" rows="83" columns="3">
- <features islongtable="true">
- <column alignment="right" valignment="top" width="0">
- <column alignment="left" valignment="top" width="0">
- <column alignment="left" valignment="top" width="0">
- <row endhead="true" endfirsthead="true">
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- Count
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- User annotation
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \series bold
- On-device classification
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 3
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/DANCING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 6
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/IDLE/SITTING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 2
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/IDLE/STANDING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 9
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/UNKNOWN
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 31
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 11
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
-
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 10
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/IDLE/SITTING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- beed
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- breathing
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- cycle
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Dancing
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/WALKING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- driving
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/WALKING/STAIRS/DOWN
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- drunkenly going to the bathroom to pee.
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- fixing my clothes
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- hhhg
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 2
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- In a car
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- in a house
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 4
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- in bed
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 2
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- it is a cat
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- kitchen work
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/IDLE/STANDING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- laundry
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- lay in bed
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- layin down
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/IDLE/STANDING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- layin in bed
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 3
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- laying down
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- laying down
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- laying down in bed
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 3
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- laying in bed
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- laying in bed with the phone on my stomach
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- lie in bed
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- ligger pa golvet
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- love
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- lying in bed
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- moving phone
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/WALKING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Nothing at all!
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/UNKNOWN
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- passenger in car straight road 50mph
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- playin gamw
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- pooping
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/UNKNOWN
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Rolling around
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/WALKING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Rotating the phone
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/WALKING/STAIRS/UP
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- seating down
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- seting
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- shake the device
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- shaking my leg sitting on my bed
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- shaking phone violently!!!
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/WALKING/STAIRS/UP
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- siq
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- sitti
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Sitting
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/IDLE/SITTING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Sitting
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/IDLE/STANDING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 19
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Sitting
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 6
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Sitting
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- sitting at my desk
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Sitting down
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- sitting on my ass
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- sitting on the couch
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- sjxjxgzog
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- sleep
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/IDLE/SITTING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 2
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- sleeping
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Standing
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Standing
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- swinging
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/IDLE/SITTING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- test
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 2
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- train
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- traveling by bus
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- traveling by car
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- travelling by bus
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 2
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- travelling by s line
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="right" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 3
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- UNCLASSIFIED/NOTCORRECTED
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/DANCING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 69
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- UNCLASSIFIED/NOTCORRECTED
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/IDLE/SITTING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 29
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- UNCLASSIFIED/NOTCORRECTED
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/IDLE/STANDING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 32
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- UNCLASSIFIED/NOTCORRECTED
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 14
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- UNCLASSIFIED/NOTCORRECTED
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 16
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- UNCLASSIFIED/NOTCORRECTED
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/WALKING
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 5
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Walking
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Walking
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- Walking (downs tairs)
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/WALKING/STAIRS/UP
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- walking in a store
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- walking in circles
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- watching amovie!
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- watching TV
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- work in the airport
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/CAR
- \end_layout
-
- \end_inset
- </cell>
- </row>
- <row>
- <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- 1
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- z
- \end_layout
-
- \end_inset
- </cell>
- <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
- \begin_inset Text
-
- \begin_layout Plain Layout
- CLASSIFIED/VEHICLE/BUS
- \end_layout
-
- \end_inset
- </cell>
- </row>
- </lyxtabular>
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- \begin_inset Float table
- placement H
- wide false
- sideways false
- status open
-
- \begin_layout Plain Layout
- \begin_inset Caption
-
- \begin_layout Plain Layout
- User-annotated
- \noun on
- Sensor Logger
- \noun default
- results
- \begin_inset CommandInset label
- LatexCommand label
- name "tab:User-annotated-Sensor-Logger"
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \end_inset
-
-
- \end_layout
-
- \begin_layout Standard
- \begin_inset Newpage pagebreak
- \end_inset
-
-
- \begin_inset CommandInset bibtex
- LatexCommand bibtex
- bibfiles "/home/chris/Projects/Java/ContextApi/papers/project"
- options "bibtotoc,savetrees"
-
- \end_inset
-
-
- \end_layout
-
- \end_body
- \end_document
|