Code Monkey home page Code Monkey logo

generika_android's Introduction

Generika Android

Generika App for Android, based on the Generikacc App for iOS.

Screenshots

Medikamente Drawer Rezept Einstellungen About

Repository

https://github.com/zdavatz/generika_android

It's available on Google Play.

Platform

  • >= Android 12.0 (API Level 31)
  • minSdkVersion 23
  • targetSdkVersion 31

Setup

Requirements

  • IcedTea 3.6 (OpenJDK 8)
  • Play Service Vision API (For Barcode Detection)

IcedTea

E.g. on Gentoo Linux

# use icedtea or icedtea-bin with `gtk` USE flag for X11
❯❯❯ equery l -po icedtea
 * Searching for icedtea ...
[IP-] [  ] dev-java/icedtea-3.6.0:8

You may want also following packages:

See a link below about Android specific packages.

https://wiki.gentoo.org/wiki/Android

Play Service (Vision API)

It's automatically prepared before initial boot on device.
This application is needed.

https://play.google.com/store/apps/details?id=com.google.android.gms&hl=en

Build

# via gradlew
% make build

# create apk (debug)
% make archive
# or
% gradle assembleDebug

# create apk (release)
% make release
# or
% gradle assembleRelease

Run

See targets run (connected emulator device).

# list your virtual devices
% make run ARGS="-list-avds"
./bin/emulator -list-avds
Nexus_5X_API_25
Nexus_5X_API_26
Nexus_5_API_27
Pixel_2_API_26
Pixel_2_API_27
Pixel_2_XL_API_26
...

# run
% make run ARGS="-avd Nexus_5_API_27"

For example, build-run-stop (cycle) will be like this:
(at console, run an emulator on X11 DISPLAY)

# pass $ARGS to gradlew
% make build ARGS="-x lint"

# run on your X11 DISPLAY ;)
% DISPLAY=":0" make run ARGS="-avd Nexus_5_API_27"

% make stop

Debugging Steps

Run the app on your device (connected via usb/wifi)

# kill/start server
% make serve
...
* daemon not runnig; starting now at tcp:5037
* daemon started successfully

% make start ARGS="5555"
% make attach ARGS="<DEVICE_IP_ADDRESS>:5555"
% make list

% make archive
% make install ARGS="..."

# start application

# tail only application logs from attached process
% make log

% make detach

Test

Run JUnit Tests.

# via gradlew
% make test
% make test ARGS="--debug"
% make test ARGS="--stacktrace"

% make test ARGS="--tests \"*Barcode*\""

Upload APK from commandline

  • Install Playup from https://github.com/jeduan/playup
  • Setup your json File with the security credentials
  • In the Console type: playup -a generika.json /path/to/app-release.apk

License

GPL-3.0

Generika Android
Copyright (c) 2018 ywesee GmbH

See LICENSE.txt.

Some parts of barcode detection work with Android Mobile Vision API using extended codes based on codes which are included in samples project provided by The Android Open Source Project as APACHE-2.0.

https://apache.org/licenses/GPL-compatibility.html

Apache 2 software can therefore be included in GPLv3 projects, because
the GPLv3 license accepts our software into GPLv3 works. However, GPLv3
software cannot be included in Apache projects. The licenses are incompatible
in one direction only, and it is a result of ASF's licensing philosophy and
the GPLv3 authors' interpretation of copyright law.
/*
 * Copyright (C) The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

See googlesamples/android-vision.

French Translations

Dr. André Dubied

generika_android's People

Contributors

b123400 avatar grauwoelfchen avatar zdavatz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

generika_android's Issues

Fix missing translation warnings (in resource XML)

I still get the following warning
> Task :app:lintVitalRelease /home/zeno/.software/generika_android/app/src/main/res/values/arrays.xml:10: Error: "settings_search_type_values" is not translated in "de" (German), "fr" (French) [MissingTranslation] <string-array name="settings_search_type_values"> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/zeno/.software/generika_android/app/src/main/res/values/arrays.xml:24: Error: "settings_search_lang_values" is not translated in "de" (German), "fr" (French) [MissingTranslation] <string-array name="settings_search_lang_values"> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/zeno/.software/generika_android/app/src/main/res/values/arrays.xml:37: Error: "settings_app_locale_values" is not translated in "de" (German), "fr" (French) [MissingTranslation] <string-array name="settings_app_locale_values"> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/zeno/.software/generika_android/app/src/main/res/values/strings.xml:75: Error: "lang_en_name" is not translated in "fr" (French) [MissingTranslation] <string name="lang_en_name">English</string> ~~~~~~~~~~~~~~~~~~~ /home/zeno/.software/generika_android/app/src/main/res/values/strings.xml:79: Error: "lang_en_abbr" is not translated in "fr" (French) [MissingTranslation] <string name="lang_en_abbr">en</string> ~~~~~~~~~~~~~~~~~~~
for
make release

Change touch desnity recording to time measurement (long press)

At onTouch on ListView, MotionEvent.ACTION_MOVE is triggered very slowly (or not smoothly) on some Devices (z.B. my FP2 Android 6.0.1). By this reason, long press event is not invoked expectedly (or it takes so long time). So, perhaps time measurement instead of touch density count might be good at here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.