New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #679 updated realpath util method #697
Conversation
Code Climate has analyzed commit 1a893e4 and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
@Swati4star Please review. |
@Swati4star If you still are facing any error to load the files, please log the actual uri's of the files.And please let me know. Cause I have another way with which I can update it if this does'nt work out. This works fine for my devices and hence I made the PR. |
@vyankatesh24 @sidhuparas Can you test it locally once? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vyankatesh24 Can you log the full URI of the file. I mean just log the |
|
@vyankatesh24 Please review now. |
And @vyankatesh24 Just to be sure your |
No! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not Working for
content://com.mi.android.globalFileexplorer.myprovider/external_files/1.xlsx
and this as well
content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3Dencoded%3DcGBWpakb4wu5i6GbZrp0QEmsFGGaaRcJBGQCYEk6rDHhD35AT%2Fx9kWnYnq%2BKyFpg
@vyankatesh24 Then what does this mean? Does this mean there is |
yes! |
@vyankatesh24 Please check again. |
@vyankatesh24 Also can you please log your |
|
@vyankatesh24 Please confirm if my last commit/push work? If not I will be pushing a new change. |
No |
@vyankatesh24 Made some changes. Please check. |
@vyankatesh24 If this doesn't work too, please let me know about the exact uri/path you used to test the |
@jddeep |
Also not working for this Output: |
@vyankatesh24 Now this time this should work for all. |
@vyankatesh24 Please review. |
@Swati4star Done. Please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jddeep
Now Conversion is working for such URIs 👍
content://com.mi.android.globalFileexplorer.myprovider/external_files/Download/CounterFoil_260418.xls
But app still crashes for following URIs
content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3Dencoded%3DcGBWpakb4wu5i6GbZrp0QEmsFGGaaRcJBGQCYEk6rDHhD35AT%2Fx9kWnYnq%2BKyFpg
The error log is as follows
E/AndroidRuntime: FATAL EXCEPTION: main
Process: swati4star.createpdf, PID: 27910
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=65536, result=-1, data=Intent { dat=content://com.google.android.apps.docs.storage/document/acc=1;doc=encoded=cGBWpakb4wu5i6GbZrp0QEmsFGGaaRcJBGQCYEk6rDHhD35AT/x9kWnYnq+KyFpg flg=0x1 }} to activity {swati4star.createpdf/swati4star.createpdf.activity.MainActivity}: java.lang.NullPointerException: println needs a message
at android.app.ActivityThread.deliverResults(ActivityThread.java:4179)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4222)
at android.app.ActivityThread.-wrap20(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1581)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6238)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
Caused by: java.lang.NullPointerException: println needs a message
at android.util.Log.println_native(Native Method)
at android.util.Log.d(Log.java:143)
at swati4star.createpdf.fragment.ExceltoPdfFragment.onActivityResult(ExceltoPdfFragment.java:145)
at android.support.v4.app.FragmentActivity.onActivityResult(FragmentActivity.java:160)
at android.app.Activity.dispatchActivityResult(Activity.java:7121)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4175
@vyankatesh24 I think we cannot upload drive files as of now. We need some more support for that. But Now Any kind of file uploads from the device locally can be feasible as you rightly mentioned, 👍 |
Then handle the exception for such URIs. The app should not crash. |
Alright, that can be done. 👍 |
@vyankatesh24 Done! Please review. |
Well done 👍 @jddeep |
Yes @worm69 the App can handle most types of URI's. But some specific drive file uri's are not handled at this moment and the user is directed accordingly. |
Description
updated realpath util method.
Fixes #679
Type of change
Just put an x in the [] which are valid.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
./gradlew assembleDebug assembleRelease
./gradlew checkstyle
Checklist: