• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Reading/Writing with Gluon Plugin

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to write/read data to my phone using the Gluon plugin with JavaFX.  If I run this as a Desktop App, it works great, if I send it to my phone the write/read functions aren't working, can anyone help?

Here are the fcns:

 
Rancher
Posts: 5008
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

aren't working,


Are there error messages in the logcat?
Does your app have permission to read/write to external storage?
 
jon rogers
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gradle build is fine and no errors in console with using stacktrace.  As far as setting permissions to external storage, I have not done that, and was not aware I needed too.
 
jon rogers
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

jon rogers wrote:Gradle build is fine and no errors in console with using stacktrace.  As far as setting permissions to external storage, I have not done that, and was not aware I needed too.



PLEASE IGNORE ABOVE::

I checked my Android Manifest and I actually did set those:

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
       <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
       <uses-permission android:name="android.permission.READ_INTERNAL_STORAGE"/>
       <uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE"/>
 
Norm Radder
Rancher
Posts: 5008
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If there are no useful messages in the logcat, try doing a little debugging to see what the code is doing by adding some print statements in the methods and inside the loops to show the values of variables as their values are changed.

The read method should close the input file when it is done with it.
 
jon rogers
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used Toast to see what was happening while using it on my phone and nothing is being shown in the toast.show().  Makes me think nothing is being written, but on Desktop it is showing me that it is.  I am wondering if I am missing something.
 
Norm Radder
Rancher
Posts: 5008
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What OS is on the phone?  If its Android, look at getting a copy of the logcat onto your PC so you can debug what is happening.  The adb command can copy the logcat to your PC.
 
jon rogers
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, its Android, I will look into how to do that, hopefully it'll give me a better answer, as console is showing nothing.  Thanks!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic