Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating one's first android app

 
Ralph Ostrander
Greenhorn
Posts: 2
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to any programing this is my second program I have the Android SDK bundle.
I want to do this same thing by clicking a button.
How do you make a button execute this.
I just want it to run the top command.

Seemed like a good mission to learn. Then I just might need to learn more before I can do it.
Please be kind.

This is where i was going.
Any help would be nice.
Sorry to hijack thread.

 
Campbell Ritchie
Sheriff
Posts: 48642
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Please don’t hijack threads, with or without apology. See what happened: you went 72 hours without a response. Please always use the code button; I have edited your code and you can see how much better it looks Unfortunately, you can also see it is incomplete and appears to stop part‑way through a line.
Is this really your second app? If so, ditch the Eclipse and use a text editor and the command line. Reserve IDEs for when you are more experienced.
It looks like code written by somebody much more experienced than second app, in which case, you can use Eclipse after all. I am not familiar with Android, but can’t see anything obviously wrong. What is going wrong? Is it something in the code you didn’t post? Give us more details and we shall see if we can’t help quicker than 72 hours
 
Ralph Ostrander
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. It really is my after hello world I watched some tutorials on youtube.
and I got it to work thanks for your help, I wont hijack any more threads.

My AVD was set up wrong for this. What I found in case some one else is having trouble.



You can't simply run 'su' on the emulator, there's no root access by default. You'll need to install the 'su' program as well as the SuperUser.apk, and you'll have to do this each time you start the emulator unless using snapshots.
 
Campbell Ritchie
Sheriff
Posts: 48642
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What’s su? For those of us who use *nix, su means change into superuser (=administrator) mode.
 
Steve Luke
Bartender
Posts: 4181
21
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:What’s su? For those of us who use *nix, su means change into superuser (=administrator) mode.


It means the same thing for Android, which is a version of *nix. The superuser mode is generally disabled by default, and the SU program Ralph describes gives access to it. Note that for actual handsets to get the SU installed you generally have to ROOT your phone, which most carriers and handset makers try to prevent.
 
Krishna Srinivasan
Ranch Hand
Posts: 1862
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

this article may be useful for you. reply back if you have more questions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic