Results 1 to 18 of 18
Like Tree1Likes
  • 1 Post By Norm

Thread: Beginners issues. can't connect nexus7 to macbook to test program.

  1. #1
    DesmondD is offline Total beginner
    Join Date
    Feb 2014
    Location
    Hamilton, New Zealand.
    Posts
    27
    Rep Power
    0

    Default Beginners issues. can't connect nexus7 to macbook to test program.

    Hi everyone, I decided a week ago that I would try my hand at writing apps for Android devices. I was advised to download some programs and am using Eclipse. My background: 30 years ago I did a one year course of computer science [among other subjects] which involved programming in Pascal. I haven't touched computer programming since then and have become an Automotive Electrician.
    Occasionally I would wish for a certain type of app or think of something that would be useful and have now decided to try and write them myself. After all, how much could have changed in 30 years???
    Anyway I started with Eclipse and wrote the basic "Hello World" app and added a few other lines of a=5, b=9, println (a*b) etc. and ran the program in the screen.
    Then I thought that perhaps I could move it onto my nexus 7 and see what it looks like there. [I have a lot to learn I suppose].
    The first issue is that I can't connect my Nexus 7 tablet to me macbook pro without using "android file transfer" and then the computer does not show the device in the finder because it is running through the file transfer program.
    I have done some research and changed the settings in the nexus to connect as a camera rather than storage but that doesn't work either.
    So my main issue now is being able to get the program onto the device - can it simply be copied and pasted into one of the files on the device using the file transfer screen?

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,321
    Rep Power
    25

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    Do you have a .apk file for the app on the mac?
    If eclipse can't install the app on the nexus, try sending the .apk file to the nexus using email. Most of the browsers will either download the apk file to the Download folder where it can be "opened" with the package installer or call the package installer directly.
    Did you try doing a copy and paste?
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,450
    Blog Entries
    7
    Rep Power
    20

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    Quote Originally Posted by DesmondD View Post
    After all, how much could have changed in 30 years???
    (a lot more than) thirty years ago Niklaus Wirth invented Pascal; not much later Berkeley came up with the 'pcode system' for the language and everybody was happy: you could compile your source code once on one machine and run it on every other machine that implemented the pcode system. Until those Unix guys came up with their 'pc' compiler that compiled Pascal source code to machine code for speed reasons; Borland did the same for the PC in the early 80s; of course, none of the systems could run each others code.

    In the 90s James Gosling invented Java and the Java virtual machine; also a jar file was implemented that contained the 'defined' system classes; and everybody was happy: you could compile your source code once on one machine and run it on every other machine that implemented the Java virtual machine. Until Google came up with their 'Dalvik' system that ran compiled Java code in another form on another virtual machine; also the 'defined' system classes were redefined; none of the systems could run each others code.

    We didn't learn much (if anything at all) from history, so no, nothing has changed much in thirty years ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    DesmondD is offline Total beginner
    Join Date
    Feb 2014
    Location
    Hamilton, New Zealand.
    Posts
    27
    Rep Power
    0

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    Quote Originally Posted by JosAH View Post
    We didn't learn much (if anything at all) from history, so no, nothing has changed much in thirty years ...

    kind regards,

    Jos
    Thanks for the quick review, very insightful :)
    I have been totally out of touch with it all.

  5. #5
    DesmondD is offline Total beginner
    Join Date
    Feb 2014
    Location
    Hamilton, New Zealand.
    Posts
    27
    Rep Power
    0

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    Quote Originally Posted by Norm View Post
    Do you have a .apk file for the app on the mac?
    If eclipse can't install the app on the nexus, try sending the .apk file to the nexus using email. Most of the browsers will either download the apk file to the Download folder where it can be "opened" with the package installer or call the package installer directly.
    Did you try doing a copy and paste?
    Thanks very much for the reply, very much what I was looking for. It's Monday morning here in NZ so I won't have time to look too far into it for now but: where will I find the .apk file? Is this regarding the "Android file transfer" app for the Nexus? Realistically I don't care too much about running it across to the tablet from the computer as much as I would rather like to be able to copy and paste or email files as you mention.
    I didn't try a copy and paste because I didn't even know how to output the file when I asked the question but I did do some online research and found a video suggesting outputting the file as a .jar file to be able to email to someone. I did this with my first program and emailed it to my brother, my wife's pc laptop and saved to one of my folders on my macbook. None of them could open. I then did some research about this and saw someone mention that they had the same problem and dragged the file to their 'apps' and it ran from there.
    Realistically I would want the most 'issue free' method of sending files to people if I do get to write useful apps, and also while I'm trying so I can send it to friends just for interest.
    I'm one of those people who was totally frustrated with my university course on Pascal because I didn't just want to see how things work on the surface, I wanted to know all the nuts and bolts of a computer. I have a useless memory so I have to understand the basics of something, as with my auto electrical job.

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,321
    Rep Power
    25

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    If you have properly setup eclipse to generate apps for Android, it will put the .apk file for the app in the bin folder.
    The .apk file can be copied from there onto the Nexus7 where it can be opened in the package installer.
    Also the apk file can be sent by email and many browsers are able to download/install it.

    I only have several months working on android projects and don't have much experience. The stackoveflow site has lots of help: Newest 'android' Questions - Stack Overflow
    DesmondD likes this.
    If you don't understand my response, don't ignore it, ask a question.

  7. #7
    DesmondD is offline Total beginner
    Join Date
    Feb 2014
    Location
    Hamilton, New Zealand.
    Posts
    27
    Rep Power
    0

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    Thanks, heading off to work now, I'll look into this later. I did download and install the add-on for Android - of course at the time my head was spinning with all the new information :)

  8. #8
    DesmondD is offline Total beginner
    Join Date
    Feb 2014
    Location
    Hamilton, New Zealand.
    Posts
    27
    Rep Power
    0

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    Today my book arrived "Java programming for Android developers for Dummies!" and I'm taking it one step at a time.
    The book is very well set out so far and takes me step by step through setting up the program and downloading samples and getting them to
    work in Eclipse. My first hurdle to overcome is that I can't find Java on my macbook. I'm using 10.6.8 and when I try to download Java 7 I am told it will not work with "such an old" operating system. I am currently downloading 10.9.1 "Mavericks" and hopefully I will be able to direct Eclipse to Java so it can run the sample programs.
    Thanks everyone for the help so far, much appreciated :)
    I'm hoping that I can eventually get to write useful apps to help me with my job and in my quest to photograph high speed explosions :)


  9. #9
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,450
    Blog Entries
    7
    Rep Power
    20

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    Don't leave your soccer ball in the water like that; it's bad for the leather ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  10. #10
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,900
    Rep Power
    5

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    Quote Originally Posted by DesmondD View Post
    Today my book arrived "Java programming for Android developers for Dummies!" and I'm taking it one step at a time.
    I like how you got a book but... why a dummies book!?!?!?!? There are so many books that are actually good and not insulting to the reader :(
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  11. #11
    DesmondD is offline Total beginner
    Join Date
    Feb 2014
    Location
    Hamilton, New Zealand.
    Posts
    27
    Rep Power
    0

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    Quote Originally Posted by gimbal2 View Post
    I like how you got a book but... why a dummies book!?!?!?!? There are so many books that are actually good and not insulting to the reader :(
    They are a series of pretty well written books, the title could perhaps rather read "for total beginners" but I think it has been accepted as being more of a humorous approach. I could understand it offending some though.

    Quote Originally Posted by JosAH View Post
    Don't leave your soccer ball in the water like that; it's bad for the leather ...

    kind regards,

    Jos
    It's actually a water balloon bursting - I wired my camera flash to a solenoid with a needle on the end :)
    My last attempt was "exploding ice cubes" with an SCR switching 300 volts through a 10amp fuse frozen in the ice as I take the picture.
    Perhaps if I get good enough with Android apps I can eventually control the timing as I would like to.



    Initially I started with normal high speed photography but I want to do things differently.


  12. #12
    DesmondD is offline Total beginner
    Join Date
    Feb 2014
    Location
    Hamilton, New Zealand.
    Posts
    27
    Rep Power
    0

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    This weekend I accomplished something. I learned how to get the "Hello World" running and found the .apk file and used "Android file transfer" to copy it into a folder on my Nexus. As mentioned I could not connect the usual way to the Nexus because I have a macbook. Of course once I copied the file across there was no icon.
    I did some research and found a free app called "Easyinstaller" to locate and install the app as a launchable icon.
    I know I still have a lot to learn and work out but I'll be able to sleep easier knowing that I at least accomplished this much :)

  13. #13
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,321
    Rep Power
    25

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    I've used email to send apk files from my developement PC to my tablet. On the tablet the file is saved in the Download folder by the email program (a browser). Then I navigate to the Download folder with a file manager program, select the apk file and chose the Install package program to install it.
    If you don't understand my response, don't ignore it, ask a question.

  14. #14
    DesmondD is offline Total beginner
    Join Date
    Feb 2014
    Location
    Hamilton, New Zealand.
    Posts
    27
    Rep Power
    0

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    Is the file manager program built in or something you've had to install?
    Of course I'd like to be able to generate a thumbnail as well with these programs but I suppose that will come with time :)

  15. #15
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,321
    Rep Power
    25

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    There are several free file managers in the Google Play Store. I have ES File Explorer and Discoverer.

    Not sure what you mean by "thumbnail". The icons for selected apps can be dragged to the desktop area.
    If you don't understand my response, don't ignore it, ask a question.

  16. #16
    DesmondD is offline Total beginner
    Join Date
    Feb 2014
    Location
    Hamilton, New Zealand.
    Posts
    27
    Rep Power
    0

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    Quote Originally Posted by Norm View Post
    There are several free file managers in the Google Play Store. I have ES File Explorer and Discoverer.

    Not sure what you mean by "thumbnail". The icons for selected apps can be dragged to the desktop area.
    I meant a custom made icon for an app when I write it.

  17. #17
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,321
    Rep Power
    25

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    icon for an app
    Those are specified in the manifest file.
    If you don't understand my response, don't ignore it, ask a question.

  18. #18
    DesmondD is offline Total beginner
    Join Date
    Feb 2014
    Location
    Hamilton, New Zealand.
    Posts
    27
    Rep Power
    0

    Default Re: Beginners issues. can't connect nexus7 to macbook to test program.

    Quote Originally Posted by Norm View Post
    Those are specified in the manifest file.
    Thanks, I'll have to look that up after work :)

Similar Threads

  1. Palindrome Test Program
    By Zelaine in forum New To Java
    Replies: 5
    Last Post: 08-27-2013, 03:22 AM
  2. test program
    By azaaza0909 in forum New To Java
    Replies: 9
    Last Post: 07-17-2012, 10:50 PM
  3. Replies: 1
    Last Post: 02-14-2011, 11:41 AM
  4. Need protect you MacBook?
    By bababoo in forum Reviews / Advertising
    Replies: 0
    Last Post: 01-12-2011, 04:36 PM
  5. Help with beginners program
    By DanK in forum New To Java
    Replies: 6
    Last Post: 12-15-2008, 05:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •