Tribler / trustchain-android

An example android app for using trustchain
GNU Lesser General Public License v3.0
3 stars 2 forks source link

Remove MutualBlockItem #29

Closed klikooo closed 6 years ago

klikooo commented 6 years ago

Remove MutualBlockItem and created the class OpenFileClickListener (to counter code duplication) which can open a file with another application

wkmeijer commented 6 years ago

I'm getting an exception when I try to open a file:

06-11 11:31:46.963 18781-18781/nl.tudelft.cs4160.trustchain_android E/AndroidRuntime: FATAL EXCEPTION: Process: nl.tudelft.cs4160.trustchain_android, PID: 18781 android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you 
        at android.app.ContextImpl.startActivity(ContextImpl.java:1365)
        at android.app.ContextImpl.startActivity(ContextImpl.java:1345)
        at android.content.ContextWrapper.startActivity(ContextWrapper.java:323)
        at nl.tudelft.cs4160.trustchain_android.util.OpenFileClickListener.onClick(OpenFileClickListener.java:67)
        at android.view.View.performClick(View.java:4790)
        at android.view.View$PerformClick.run(View.java:19933)
        at android.os.Handler.handleCallback(Handler.java:739)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:135)
        at android.app.ActivityThread.main(ActivityThread.java:5569)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:931)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:726)

It's weird because I only get it on android 5.0, not on 8.0.

UPDATE: fixed (it was a known issue)