Giter Club home page Giter Club logo

pslab-android's Issues

Opening "Applications" window for the first time lags!

As @viveksb007 pointed out in #92, the application lags a little bit when we're opening the Applications tab for the first time.
As observed from the logs,

05-06 22:53:11.275 8299-8299/org.fossasia.pslab D/dalvikvm: GC_FOR_ALLOC freed 2460K, 14% free 22474K/25992K, paused 35ms, total 39ms
05-06 22:53:11.275 8299-8299/org.fossasia.pslab I/dalvikvm-heap: Grow heap (frag case) to 24.156MB for 1440016-byte allocation
05-06 22:53:11.305 8299-8308/org.fossasia.pslab D/dalvikvm: GC_FOR_ALLOC freed 6690K, 38% free 17190K/27400K, paused 22ms, total 22ms
05-06 22:53:11.325 8299-8299/org.fossasia.pslab D/dalvikvm: GC_FOR_ALLOC freed 62K, 38% free 17127K/27400K, paused 16ms, total 16ms
05-06 22:53:11.325 8299-8299/org.fossasia.pslab I/dalvikvm-heap: Grow heap (frag case) to 20.651MB for 3240016-byte allocation
05-06 22:53:11.356 8299-8308/org.fossasia.pslab E/dalvikvm: adjustAdaptiveCoef max=4194304, min=1048576, ut=568
05-06 22:53:11.356 8299-8308/org.fossasia.pslab D/dalvikvm: GC_FOR_ALLOC freed 0K, 26% free 20291K/27400K, paused 25ms, total 25ms
05-06 22:53:11.386 8299-8303/org.fossasia.pslab E/dalvikvm: adjustAdaptiveCoef max=6291456, min=1572864, ut=368
05-06 22:53:11.386 8299-8303/org.fossasia.pslab D/dalvikvm: GC_CONCURRENT freed 1K, 14% free 23625K/27400K, paused 6ms+4ms, total 28ms

there is a possible memory intensive task is happening. Currently I am investigating on this issue!

Changing "Applications" list with cardviews

The current Applications view consists of a list view with basic list items. It doesn't have much of a description on what each item would do.

Current View
device-2017-05-06-174450

This view can be enhanced with the help of a list view with card items or a grid view as follows!

Card Views Grid Views
image image

If this feature is okay to implement, I can get to work on it! :)

Port AD7718

Have to implement AD7718 in the Android version!

modify polynomial processing functions in AnalogChannel

modify polynomial processing functions in AnalogInputSource to handle arguments as single value and array both.
Source File link

New Polynomial Implementation should be taken into consideration i.e Polynomial object provided by apache common math library and necessary changes should be made.
About Apache Common Math Polynomial #71

Control Activity's UI

The following are the screenshots of proposed design of Control Activity.

screenshot_1491877051

screenshot_1491877070

The following has been implemented using 2 ListViews.
Please give suggestions and also review Oscilloscope's UI #33 so that I can make amendments while the python code is been ported.

Oscilloscope UI

This is the first step towards the development Oscilloscope's UI.

screenshot_1491903305

screenshot_1491903314

The above image showcase the landscape mode of the Oscilloscope Activity.
Gestures will also be integrated, like
-pinch zoom for changing the timebase.
-double tap on the graph to freeze.
-swipe down to save.

Please give suggestions on:
-layout and what needs to be improved.
-real-time graph api to be used ( I have used GraphView http://www.android-graphview.org). We can also use MPAndroidChart https://github.com/PhilJay/MPAndroidChart).
-I have researched on 3D graphs libraries but they are paid.
-any other thing I missed.

Home Fragment UI

screen shot 2017-04-06 at 11 16 41 pm

This is a proposed design for Home Fragment UI. The following things will be implemented

  • Pinch Zoom
  • Improvement in the quality of the image of the PIN Diagram and the description of the PINs.

Avoid Confusion

To avoid any confusion like I and @viveksb007 ended up working on the same code SensorList.py, I am hence telling I am starting to port MCP4728, NRF24L01, RadioLink (Peripherals) into the Android app. If you are working on same do let me know @viveksb007

Working on Peripherals

To avoid any confusion like I and @viveksb007 ended up working on the same code SensorList.py, I am hence telling I am starting to port MCP4728, NRF24L01, RadioLink into the Android app.

Handling abrupt disconnection/device not found cases

Addition of a manual Retry/Reconnect button in the Home UI if connection fails even when the device is connected.
While in operation, if the device gets abruptly disconnected, two solutions can be done-

  1. Landing back on Home UI and trying to reconnect again.
  2. Displaying a toast asking user to manually reconnect again.

Although its a minor issue, I would like to do it to get started and also get a hang of this project.

implement readLine function in CommunicationHandler.java

Implement readLine function in CommunicationHandler.java, so that we can read a line i.e String terminated by '\n' and we don't know length of string beforehand.

Possible approach- read single byte in a loop and check for '\n', when found return the byte array formed before encountering '\n'. Tried but error in reading single byte from bulkTransfer. May be due to high BaudRate of 1Mbps.

For now it would only be used to read version String of device.

Autogenerate app in apk branch

Please create an apk branch and autogenerate the app here on each build. Please ensure the previous apks are not saved in the history to ensure the repository is not getting super big.

Follow the way it is done for open event android and ask in the open event android channel for help, if needed.

integrate TravisCI and Codacy

Please integrate TravisCI and Codacy, which would automate code review and easy to see build status before merging the PR.

Add build instructions to compile and download standalone APK files

The source has been tested with Android Studio 2.3.1 with Gradle 3.2, and builds without errors once a few dependencies have been synced. However, automatic Download & execution failed.
Device: Xiaomi Redmi 3S + , Android Version 6.0.1 MMB29M, MIUI : Global 8.2 |Stable

as_err1

Console Output

04/14 15:38:33: Launching app
$ adb install-multiple -r /home/jithin/ACTIVE_PROJECTS/PSLab/pslab-android/app/build/outputs/apk/app-debug.apk /home/jithin/ACTIVE_PROJECTS/PSLab/pslab-android/app/build/intermediates/split-apk/debug/slices/slice_4.apk ... [Truncated]  ... slice_3.apk 
$ adb shell pm uninstall org.fossasia.pslab
DELETE_FAILED_INTERNAL_ERROR
Error while Installing APKs

The uninstall process causes it to fail , but the Apk can be installed via adb separately. Using the 'build apk' command creates app-debug.apk , so please add instructions on building a standalone Apk
$ adb install -r app-debug.apk

This App will wait for the debugger to attach ( Can be launched separately via Android Studio), and then displays the Home page.

I will try to test on a few other Android devices to check if the uninstallation failure is not an MIUI specific issue.

Communication error

To be tested with hardware

java.lang.RuntimeException: Unable to start activity ComponentInfo{org.fossasia.pslab/org.fossasia.pslab.activity.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.hardware.usb.UsbDeviceConnection.claimInterface(android.hardware.usb.UsbInterface, boolean)' on a null object reference
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2423)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2483)
	at android.app.ActivityThread.access$900(ActivityThread.java:153)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:148)
	at android.app.ActivityThread.main(ActivityThread.java:5441)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.hardware.usb.UsbDeviceConnection.claimInterface(android.hardware.usb.UsbInterface, boolean)' on a null object reference
	at org.fossasia.pslab.communication.CommunicationHandler.open(CommunicationHandler.java:80)
	at org.fossasia.pslab.communication.ScienceLab.<init>(ScienceLab.java:34)
	at org.fossasia.pslab.activity.MainActivity.onCreate(MainActivity.java:74)
	at android.app.Activity.performCreate(Activity.java:6303)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2376)
	... 9 more

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.