All Projects → TriangleLeft → Flashcards

TriangleLeft / Flashcards

Licence: Apache-2.0 License
Unofficial mobile client for https://www.duolingo.com/

Programming Languages

java
68154 projects - #9 most used programming language
swift
15916 projects
objective c
16641 projects - #2 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to Flashcards

AndroidMvpSample
Demonstrate a way that how to user MVP architecture in Android development
Stars: ✭ 14 (-41.67%)
Mutual labels:  mvp
Narvalo.NET
Applied functional patterns for C#. Money and Currency types. MVP framework. (Obsolete)
Stars: ✭ 16 (-33.33%)
Mutual labels:  mvp
Android-Learning-Resources
My curated list of resources for learning Android Development.
Stars: ✭ 24 (+0%)
Mutual labels:  mvp
aLiangWanAndroid
玩Android项目
Stars: ✭ 19 (-20.83%)
Mutual labels:  mvp
Image-Detection-Samples
This sample app supports "Building a MVP with Face recognition and AR" and "Quest of a Hero part 2" presentations as well as it has two different possibilities to build face detection mechanism. The first one is OpenCV based and the second one is by means of Camera 2 API
Stars: ✭ 36 (+50%)
Mutual labels:  mvp
TpHulk
androidx,mvp,mvvm,jetpack
Stars: ✭ 19 (-20.83%)
Mutual labels:  mvp
nimble
Nimble is a small, quick and flexible Model-View-Presenter(MVP) library for Android.
Stars: ✭ 24 (+0%)
Mutual labels:  mvp
easyium-python
easyium is an easy-to-use wrapper for selenium&appium and it can make you more focus on business not the element.
Stars: ✭ 13 (-45.83%)
Mutual labels:  appium
ios-architecture-example
Architecture pattern simple examples in iOS. You can compare differences in MVC, MVP, MVVM-Delegate and MVVM-Rx for same feature
Stars: ✭ 16 (-33.33%)
Mutual labels:  mvp
mvc-tree
🌳 A chronological visualization of the family of MVC patterns.
Stars: ✭ 40 (+66.67%)
Mutual labels:  mvp
EasyUtAndroid
Android unit testing example 全面的android应用单元测试方法及案例
Stars: ✭ 21 (-12.5%)
Mutual labels:  mvp
SimpleMvp
一个精简的Android MVP框架
Stars: ✭ 39 (+62.5%)
Mutual labels:  mvp
AndroidMVPArchitecture
Android MVP architecture sample project with or without RxJava and Dagger2 and Kotlin
Stars: ✭ 78 (+225%)
Mutual labels:  mvp
MVVM
MVVM - POP & OOP
Stars: ✭ 13 (-45.83%)
Mutual labels:  mvp
appium-kotlin-example
No description or website provided.
Stars: ✭ 24 (+0%)
Mutual labels:  appium
sonic-server
🎉Back end of Sonic cloud real machine testing platform. Sonic云真机测试平台后端服务。
Stars: ✭ 980 (+3983.33%)
Mutual labels:  appium
mvp-android-template
MVP Android Template to give you a Quick Head Start for your next Android Project. It implements MVP Architecture using Dagger2, Room, RxJava2 , Retrofit2
Stars: ✭ 20 (-16.67%)
Mutual labels:  mvp
KotlinMvpTemplateGenerator
Android Studio template for Kotlin with MVP + Dagger2 + Retrofit2
Stars: ✭ 65 (+170.83%)
Mutual labels:  mvp
react-mvp
Model-View-Presenter Proof of Concept in React
Stars: ✭ 38 (+58.33%)
Mutual labels:  mvp
WanAndroid
💪 WanAndroid应用,持续更新,不断打造成一款持续稳定, 功能完善的应用
Stars: ✭ 50 (+108.33%)
Mutual labels:  mvp

Flashcards

Unofficial mobile client for https://www.duolingo.com/. Allows viewing list of known words, and reviewing them via flashcards. (this functionality is missing from their mobile app)

Use your Duoling login and password to login. If you don't have one but want to preview app use the following one: appiumtest/appiumtest

Android iOS
AndroidList iOSList
Get it on Google Play TBD

Cross-Platform

All business logic is placed into separate java-only module (called "core"). Android app, simply includes it as jar dependency, while for iOS it is translated by j2objc into Obj-C code that is then compiled and packaged into .framework (type of library for iOS projects). Translation and compilation are done using j2objc-gradle plugin. Packaging into framework is done by custom makefile (core/Makefile)

This app uses vector graphics only, so they too are shared between Android and iOS. As I am targeting API 16, during build of Android app, aapt generates multiple png images for each dpi. For iOS we need only three types: 1x (mdpi), 2x (xhdpi), 3x (xxhdpi). They are packaged into .assets file (core/assets.mk) that is included into XCode project.

You can read full overview in my reddit post: https://www.reddit.com/r/androiddev/comments/566la7/example_crossplatform_app_using_j2objc/

Tests

All unit tests within "core" module are also translated to ObjC and run automatically during building of framework. (to make sure that translated code also works as expected)

UI testing is done using appium. Test are mostly platform independent (with the exception of keyboard uage). To interact with ui elements I use "pages": abstract objects with fields representing elements on screen. Mapping is done using annotations, which one is used depends on the current driver.

    @AndroidFindBy(id = "com.triangleleft.flashcards:id/flashcard_translation")
    @iOSFindBy(accessibility = "flashcard_translation")
    public WebElement translation;

As appium is black-box testing so in order to mock network responses we build a special version of app with endpoint replaced to adress of local server. (Ideally one should use proxy or custom DNS server to intercept requests and test release version of app) To run UI tests for Android:

  • start appium server
  • start android emulator
  • build appium variant of app (./gradlew :app:assembleAppium)
  • run appium tests (./gradlew :appium:androidTest)

To run UI tests for iOS: (broken as of 04.10.16 due to XCode 8 update)

  • start appium server
  • start iOS simulator
  • build and install appium varion of app using XCode
  • run appium tests (./gradlew :appium:iosTest)

Bulding and running

  • Download and unpack j2objc-1.1
  • Create symlink to your unpacked j2objc: ln -s <path_to_unpacked_j2objc ~/Library/j2objc. This is the directory XCode expects it to be. (Alternatively your can manually update XCode targets and change user-defined build setting J2OBJC_HOME)
  • Update your local.properties file:
sdk.dir=<path_to_android_sdk>
j2objc.home=<path_to_unpacked_j2objc>
  • Copy frameworks from j2objc to your frameworks dir:
sudo cp -a <path_to_unpacked_j2objc>/frameworks/. /Library/Frameworks/
  • If you want to assemble release version of Android App create keystore.properties file with following contents:
keyPath=<path_to_your_key>
keyAlias=<key_alias>
keyPassword=<key_password>
storePassword=<key_store_password>
  • Add JAVA7_HOME - path to JDK7 to your environment variables (this is needed for Retrolambda to make sure unit-tests are run using JDK7)

To build Android version:

  • ./gradlew assembleDebug

To build iOS version

  • ./build_framework.sh
  • make sure you have CocoaPods installed
  • move to ios dir and run pod install (you have to do it once)
  • open ios/Flashcards.xcworkspace
  • Use XCode to build
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].