Hello,
You were right about y.add(Double.parseDouble(s));.
The problem continues though,the plot is empty.
I did Log.i("VALUE",s); but it doesn't appear anywhere!
Also, i did debug ,i put toggle point on s = br.readLine(); but it doesn't appear!
I run the app and i had the logcat opened.I saw this:
In the 1 actrivity , i enter the data.In the 2 activity it show me the result.At logcat it shows me "Filenot found exception".But the result is ok.I don't understand.
Also, the same message is showed when i press to do the plot.
I use linux,eclipse.
Thank you !
-------------UPDATED-------------------------
I figured this!
1) The folder that we had, was wrong, i did "String fs = "/data/data/com.wordpress.androiddevgeo.Radiation/files/results";" which now exists.
2) When i run the app ,i see from the file explorer the size of the file.
When i go from 1 to 2 activity (where i see the result) the files grows to 80000 size (it's in bytes ,right?) .
3) When i go from 2 to 3 activity in order to do the plot,it crashes :
- Code: Select all
...
02-20 13:30:03.018: I/global(2184): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
02-20 13:30:08.377: D/dalvikvm(2184): GC_FOR_MALLOC freed 14261 objects / 604088 bytes in 218ms
02-20 13:30:13.727: D/dalvikvm(2184): GC_FOR_MALLOC freed 10743 objects / 447248 bytes in 247ms
02-20 13:30:20.381: D/dalvikvm(2184): GC_FOR_MALLOC freed 10919 objects / 437816 bytes in 211ms
02-20 13:30:22.757: D/AndroidRuntime(2184): Shutting down VM
02-20 13:30:22.779: E/AndroidRuntime(2184): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.wordpress.androiddevgeo.Radiation/com.wordpress.androiddevgeo.Radiation.LineGraph_mass}: java.lang.NullPointerException: println needs a message
02-20 13:30:22.779: E/AndroidRuntime(2184): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-20 13:30:22.779: E/AndroidRuntime(2184): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-20 13:30:22.779: E/AndroidRuntime(2184): at android.os.Handler.dispatchMessage(Handler.java:99)
02-20 13:30:22.779: E/AndroidRuntime(2184): at android.os.Looper.loop(Looper.java:123)
02-20 13:30:22.779: E/AndroidRuntime(2184): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-20 13:30:22.779: E/AndroidRuntime(2184): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-20 13:30:22.779: E/AndroidRuntime(2184): at dalvik.system.NativeStart.main(Native Method)
02-20 13:30:22.779: E/AndroidRuntime(2184): Caused by: java.lang.NullPointerException: println needs a message
02-20 13:30:22.779: E/AndroidRuntime(2184): at com.wordpress.androiddevgeo.Radiation.LineGraph_mass.getIntent(LineGraph_mass.java:83)
02-20 13:30:22.779: E/AndroidRuntime(2184): at com.wordpress.androiddevgeo.Radiation.LineGraph_mass.onCreate(LineGraph_mass.java:57)
02-20 13:30:22.779: E/AndroidRuntime(2184): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
I tested it with small numbers and it fives me the same results (of course the file size is a lot smaller).