Search This Blog
Tuesday, February 16, 2016
Kotlin Developer Starter in Android projects
During our STX Next's Lightning Talks I'd given a presentation about Kotlin. It's a quick starter about the language. The idea was to create a short talk that would fit in a timeframe of 45m-1h. I assumed that attendees had basic skills from Android development, functional programming, java JDK and some JVM languages like - scala, closure or groovy.
Slideshare presentation:
https://t.co/oVPJw1YIGa
Presentation summary:
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice for Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, on one hand covering major advantages for developers and keeping short compile times on the other.
This presentation is a Developer Starter - a set of hand-picked information allowing a person with no knowledge of Kotlin to start writing basic Android activities and set up a kotlin-based Android project. It starts with language background, reasons for its creation and advantages. Then presents basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin compilation is presented and the language is compared to SCALA and SWIFT.
Tuesday, December 8, 2015
Automated acceptance tests in Calabash
The Mobilengers team at StxNext has recently moved to Calabash as our automated acceptance testing framework. All tests are written in Gherkin - simple, descriptive language that Cucumber can understand. Gherkin gives the ability to describe the desired behaviour in plain text preserving the possibility to run such a test on real devices. It serves two purposes - as a documentation tool and as automated tests framework. It has been translated to over 60 spoken languages (with leading English) so that your team can use the keywords in their own language.
Automated tests follow two simple conventions - that source file should be saved as .feature and that one source file should only contain description of a single feature.
Calabash is the mobile implementation of Cucumber. It enables native apps testing and is cross-platform - Android/iOS. It’s also open-source with all the code available freely on GitHub.
With Calabash we’re able to implement simple gestures (like - swipe down, button-clicks, go back etc.), make assertions concerning displayed content as well as take screenshots whenever something goes wrong in the app.
Running tests in the cloud on the real devices gives us the possibility to cover more devices without buying every phone available on the market. We use Amazon AWS Device Farm which has the possibility to run Calabash tests and covers most popular device models. It also gives detailed tests results, takes screenshots as well as pinpoints references to lines of source code where specific errors have originated from. AWS has the option to test apps in different device locales, GPS locations and specific “other apps” dependencies.
Simple tutorial on how to install Calabash (OsX/Ubuntu) and run basic tests can be downloaded here.
Reference:
https://github.com/kosiara/calabash-android-example-projects
https://github.com/calabash/calabash-android
https://github.com/calabash/calabash-ios
https://cucumber.io/
https://github.com/cucumber/cucumber/wiki/Gherkin
http://www.slideshare.net/Codemotion/calabash-codemotion-2012 (ios)
http://docs.aws.amazon.com/devicefarm/latest/developerguide/welcome.html
Books:
https://pragprog.com/book/hwcuc/the-cucumber-book
Automated tests follow two simple conventions - that source file should be saved as .feature and that one source file should only contain description of a single feature.
Calabash is the mobile implementation of Cucumber. It enables native apps testing and is cross-platform - Android/iOS. It’s also open-source with all the code available freely on GitHub.
With Calabash we’re able to implement simple gestures (like - swipe down, button-clicks, go back etc.), make assertions concerning displayed content as well as take screenshots whenever something goes wrong in the app.
Running tests in the cloud on the real devices gives us the possibility to cover more devices without buying every phone available on the market. We use Amazon AWS Device Farm which has the possibility to run Calabash tests and covers most popular device models. It also gives detailed tests results, takes screenshots as well as pinpoints references to lines of source code where specific errors have originated from. AWS has the option to test apps in different device locales, GPS locations and specific “other apps” dependencies.
Simple tutorial on how to install Calabash (OsX/Ubuntu) and run basic tests can be downloaded here.
Reference:
https://github.com/kosiara/calabash-android-example-projects
https://github.com/calabash/calabash-android
https://github.com/calabash/calabash-ios
https://cucumber.io/
https://github.com/cucumber/cucumber/wiki/Gherkin
http://www.slideshare.net/Codemotion/calabash-codemotion-2012 (ios)
http://docs.aws.amazon.com/devicefarm/latest/developerguide/welcome.html
Books:
https://pragprog.com/book/hwcuc/the-cucumber-book
Sunday, May 10, 2015
PEKA - wirtualny monitor
Niedawno rozpoczęły się prace nad aplikacją umożliwiającą sprawdzanie dokładnego czasu przyjazdu tramwajów i autobusów.
Nareszcie możliwe jest wygodne korzystanie z wirtualnego monitora systemu PEKA na urządzeniach mobilnych.
Jeżeli mieszkasz w Poznaniu - wybierz ulicę, a następnie swój przystanek - aby zobaczyć dane, które pozwolą Ci DOKŁADNIE określić w którym momencie przyjedzie Twój tramwaj/autobus.
Funkcje:
- szukaj połączeń autobusowych/tramwajowych według ulicy/nazwy przystanku/nr linii
- dodawaj poszczególne przystanki do ulubionych, aby mieć do nich szybki dostęp
- połączenia z rzeczywistym czasem przyjazdu są oznaczone niebieskim "GPS"
- widget umożliwiający obserwowanie swojego ulubionego przystanku
Kliknij tutaj, aby przejść do Google Play.
Saturday, April 4, 2015
OsX - handful of shortcut key combinations
1. q: Where is the insert key a: Apple's keyboard does not have an insert key
emulate 'ins' key by pressing Ctrl + "t"
2. q: Where is the ~ key? a: to the right of the left "shift" key
3. q: How to take a screenshot of the screen? a: press "ctrl" + 3 - to take the screenshot of the entire screen and "ctrl" + 4 - to take the screenshot of the selected screen area. Screenshots are saved on the desktop
Resources:
mac-os-x-and-midnight-commander-the-missing
emulate 'ins' key by pressing Ctrl + "t"
2. q: Where is the ~ key? a: to the right of the left "shift" key
3. q: How to take a screenshot of the screen? a: press "ctrl" + 3 - to take the screenshot of the entire screen and "ctrl" + 4 - to take the screenshot of the selected screen area. Screenshots are saved on the desktop
Resources:
mac-os-x-and-midnight-commander-the-missing
Sunday, March 29, 2015
OsX - default partition table
What is the default partition type on OsX 10.10 Yosemite?
Partition table: GUID partition table (gpt)
partition type: hfs+
Partition table: GUID partition table (gpt)
partition type: hfs+
Wednesday, March 18, 2015
OsX - choose the right Java version for Intellij 14 CE
/Applications/IntelliJ IDEA 14 CE.app/Contents/bin/inspect.sh
2015-03-18 21:02:24.425 idea[962:382297] No matching VM found.
[JavaAppLauncher Error] CFBundleCopyResourceURL() failed loading MRJApp.properties file
[JavaAppLauncher Error] CFBundleCopyResourceURL() failed while getting Resource/Java directory
[LaunchRunner Error] No main class specified
[JavaAppLauncher Error] CallStaticVoidMethod() threw an exception
Exception in thread "main" java.lang.NullPointerException
at apple.launcher.LaunchRunner.run(LaunchRunner.java:113)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:51)
at apple.launcher.JavaApplicationLauncher.main(JavaApplicationLauncher.java:61)
Download the newest "Apple Java" from here.
Download the regular Oracle Java.
Remember to set the JAVA_HOME variable in .bash_profile correctly:
export JAVA_HOME= /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home
You can also edit the file: /Applications/IntelliJ IDEA 14 CE.app/Contents/Info.plist
and change 1.6 to 1.8
export JAVA_HOME= /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home
You can also edit the file: /Applications/IntelliJ IDEA 14 CE.app/Contents/Info.plist
and change 1.6 to 1.8
Friday, March 6, 2015
Android - List all activities from *.apk file
aapt dump xmltree <apk-file> AndroidManifest.xml
Subscribe to:
Posts (Atom)