i'd have bats test created every file in directory, i'm not sure best way done is. approach below creates single test when there many files in directory. #!/usr/bin/env bats in $(ls) @test "testing $i" { pwd } done to extract ls output not batter solution go wrong on filenames spaces. you can below shopt -s nullglob file in /dir/* //test command on $file done shopt -u nullglob you can using find command also find /some/directory -maxdepth 1 -type f -exec cmd option {} \;
i using alarm manager inexactrepeating starting pendingintent . works great - problem service running every time app started, after ondestroy (ie orientation change, manually swiping app in recent). i have set 20 min intervals, , long dont ondestroy app - oncreate automatically starts service screws timing. service ever called, once, through alarm manager. how check see if app needs run it? boolean of running inside service in shared preferences or something? you place alarmmanager in class application class creates once during application startup. ensure app creates 1 instance of alarmmanager when first starts up. in other words, create class extends application , , in oncreate(), create instance of alarmmanager class , store instance in application class. inside class holds alarmmanager, in constructor create new instance of alarmmanager. in application class, create getter method of app's other activities or fragments retrieve , use 1 instance of ...
Comments
Post a Comment