cropai / android-application Goto Github PK
View Code? Open in Web Editor NEWCrop Analyzer Android Application
License: GNU General Public License v3.0
Crop Analyzer Android Application
License: GNU General Public License v3.0
Send a POST request to https://crop-leaf.herokuapp.com/ with the image file selected by user as one of the parameter and log the response.
Create a markdown file by your name in the screenshots
folder and add 3-4 screenshots of the app including 'on boarding', 'selecting image' and 'result'. Download the app using the APK given in README.md. Also, mention which device you tested the android app on in the PR description.
Currently after fetching the getting the JSON response, the Result Activity looks like this(see the attached image), parse this JSON into Java objects and show the information in different views.
All the code change will be done in ResultActivity only. DON'T change code in any other activity.
PS : Please do comment 'I am working on this' if you want to work on this issue, else PR won't be considered.
Delete the text in current README.md and add similar stuff as it was in https://github.com/CropAi/Backend till the PRE-REQUISITES
Could you please use releases/
and attach your APK there? This would also allow to see when there's a new version available โ and enable you to provide release notes (if you wish). It's also where people usually look for, um, releases ๐ Thanks!
Today I finally found time to give your app a try. Took a photo of one of our roses which seems to have mildew. Fed it to CropAI. After about a minute, the app informed me my potato would be healthy.
Am I doing something wrong? Cannot have fed the wrong photo (we have no potatoes) โ and treatment hints on potatoes are not especially helpful if I have issues with a rose ๐ Sent the photo again, same results. Sent a variant cropped to a single leaf, again the same results.
Here's the cropped photo (resized; the variant I sent for analysis was full-size):
Doesn't look like a potato leaf to me ๐คฃ Any hints?
PS: Looking at the screenshots embedded to the Readme, that's exactly what I get ("Potato Healthy"). If regardless on the image sent, it always displays that โ what does the analysis do then, and what does it need a photo for?
Honestly, I'm not ranting. I know this is an "early bird" โ I just want to understand what I can expect from it. I'll gladly try again later should that be a problem with the backend โ or try with a later version of the Android app when available. Thanks!
Keep the button name as 'Upload Image' and set it's id to : '/buttonUpload' (this is also the naming convention that we will follow for the whole project).
In the understanding-bugs
folder, create a markdown file for any bug/error you faced while implementing a feature in this project. Refer to the README file in understanding-bugs
folder for further instructions.
The flow of the android app :
You now have a basic idea about how the app will function, you can take inspiration from it and roll in some beautiful designs for On Boarding screen.
You can add your design mockups in onboarding-design-mockups
folder.
Description
App Crashes after selecting an image.
Log
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=100, result=-1, data=Intent { dat=content://media/external/images/media/75376 flg=0x1 launchParam=MultiScreenLaunchParams { mDisplayId=0 mBaseDisplayId=0 mFlags=0 } (has extras) }} to activity {com.boss.cropanalyzerapp/com.boss.cropanalyzerapp.MainActivity}: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
at android.app.ActivityThread.deliverResults(ActivityThread.java:4556)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4599)
at android.app.ActivityThread.-wrap22(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1715)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6816)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1565)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1453)
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
at com.boss.cropanalyzerapp.MainActivity.onActivityResult(MainActivity.java:232)
at android.app.Activity.dispatchActivityResult(Activity.java:7337)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4552)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4599)ย
at android.app.ActivityThread.-wrap22(ActivityThread.java)ย
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1715)ย
at android.os.Handler.dispatchMessage(Handler.java:102)ย
at android.os.Looper.loop(Looper.java:154)ย
at android.app.ActivityThread.main(ActivityThread.java:6816)ย
at java.lang.reflect.Method.invoke(Native Method)ย
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1565)ย
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1453)ย
Device
Samsung J2 Android 7.1.1 API 25
ImageView is assigned -> User clicks on 'ANALYZE' -> Launch new activity
ImageView is not assigned -> User clicks on 'ANALYZE' -> Show a Toast of 'No Image Selected'
This imageView will be used to display the selected image file.
Include screenshots and explain the working of android application. Add 3 on boarding screenshots for first time users(arrange them all in one row) and other screenshots including 1 for picking image from gallery, 1 for request (showing timer) and 1 which shows results(show these 3 also in one row).
For Image size : scale it according to the width (250px), use https://www6.lunapic.com/editor/ for image scaling tasks. Do comment 'I am working on it' else PR won't be considered. Only 1 PR which is most descriptive and engaging will be merged for this issue.
PS : All the content should be in html.
PPS : Make it as descriptive as possible.
You can refer to other repositories and come up with something similar.
Currently, the Uri
of the file is being logged, use the Uri
i.e intent.getData()
in onActivityResult()
function to print the file path.
Refer this link : https://stackoverflow.com/questions/13209494/how-to-get-the-full-file-path-from-uri
Device: Oneplus 6
OS: Android 10(Q) Oxygen OS
After installation, when I tried to test the app I noticed two problems:
All views created till now : Button and Image View.
We will be needing these permissions for accessing images files stored on user's device.
Add your valuable suggestions in the demo-logos
folder. Preferred format : .svg amd .png
Instead of using button for uploading file, we will set a click listener on image view instead and use the button for selecting image file therefore we will change button text to ANALYZE. Also make sure the ANALYZE button when clicked shows a Toast of 'No file selected' if user has not uploaded any file and clicks on this button.
Here's the Weekly Digest for CropAi/Android-Application:
Last week 2 issues were created.
Of these, 2 issues have been closed and 0 issues are still open.
โค๏ธ #2 modified manifest.xml for app name, by dev-rocky
โค๏ธ #1 added material design library, by dev-rocky
Last week, 2 pull requests were created, updated or merged.
Last week, 2 pull requests were merged.
๐ #2 modified manifest.xml for app name, by dev-rocky
๐ #1 added material design library, by dev-rocky
Last week there were 5 commits.
๐ ๏ธ Merge pull request #2 from dev-rocky/app-name-change modified manifest.xml for app name by tanishq9
๐ ๏ธ modified manifest.xml for app name by tanishq9
๐ ๏ธ Merge pull request #1 from dev-rocky/master added material design library by tanishq9
๐ ๏ธ added material design library by tanishq9
๐ ๏ธ add new folder by tanishq9
Last week there was 1 contributor.
๐ค tanishq9
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository CropAi/Android-Application to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
When the upload file button is clicked check if this permission android.Manifest.permission.READ_EXTERNAL_STORAGE
is granted or not, if not then request this permission to be granted.
If user grants the permission then make an implicit intent to pick image from gallery. Log the path of the image selected by user.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.