<commit_before># 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](media/android/list.png)|![iOSList](media/ios/list.png)|
|<a href='https://play.google.com/store/apps/details?id=com.triangleleft.flashcards&hl=en&utm_source=global_co&utm_medium=prtnr&utm_content=Mar2515&utm_campaign=PartBadge&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png'/></a>|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](http://j2objc.org/) 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](https://github.com/j2objc-contrib/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.

## Tests<commit_msg>Added link to my reddit post<commit_after># 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](media/android/list.png)|![iOSList](media/ios/list.png)|
|<a href='https://play.google.com/store/apps/details?id=com.triangleleft.flashcards&hl=en&utm_source=global_co&utm_medium=prtnr&utm_content=Mar2515&utm_campaign=PartBadge&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png'/></a>|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](http://j2objc.org/) 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](https://github.com/j2objc-contrib/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
{'fraction_non_alphanumeric': 0.10580204778156997, 'fraction_numerical': 0.012229806598407281, 'mean_word_length': 5.2247787610619465, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 9, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2156130', 'n_tokens_mistral': 1125, 'n_tokens_neox': 1080, 'n_words': 378}