1. Download our Official Android App: Forums for Android!

Apps Permissions of the Hello World Tutorial

Discussion in 'Android Development' started by elfstone, Aug 31, 2010.

  1. elfstone

    elfstone Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    2
    Joined:
    Aug 31, 2010

    Aug 31, 2010
    2
    0
    5
    Hello,
    this is my first step into android development, so I hope I don't miss anything obvious.

    I followed the hello world tutorial on Hello, World | Android Developers on my eclipse 3.5 on linux. I chose Android 2.1-update1 as target, and it worked fine in the AVD.
    I then wanted to test the app on my cellphone (samsung galaxy S), but had problems with USB connectivity. I found a .apk file in the /bin directory of the workspace and copied it to the phone. I installed it using the file manager, but:

    It requests the following permissions:
    SD-Memory acces
    Calls - Read status of telephone (those are translated)

    I googled and found out that permissions are set in the AndroidManifest.xml. But said xml does not contain any permissions, and I have seen other apps that dont require any permissions at all.. So, what am I doing wrong?
     

    Advertisement

  2. SWhite

    SWhite Newbie
    Rank:
    None
    Points:
    16
    Posts:
    17
    Joined:
    Apr 15, 2010

    Apr 15, 2010
    17
    1
    16
    Student, Developer
    Louisiana
    permissions are required if your app does something it needs information from the phone hardware in order to do the task. for instance, an app that pinpoints your current location would require the ACCESS_FINE_LOCATION permission.

    if your app reacts in some way to the current calling status of the phone, or initiates calls, it will need various permissions to do so. see the API for more details of available permissions.

    my guess with the sd memory is that since the apk is on the sd card, the app needs privileges to access the card in order to execute. try moving the apk to another directory in the phone.

    good luck
     
  3. elfstone

    elfstone Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    2
    Joined:
    Aug 31, 2010

    Aug 31, 2010
    2
    0
    5
    Concept of .apk..
    I have to admit, that I don't even know, what an .apk file does. I asumed when I click on the .apk file it will install itself to the phone (somewhere in /data, not on the sd-card), so it shouldn't require any permisions.

    Also I don't understand why the hello-world app claims to need permision to access phone status.(All it does is create a single TextView).

    Especially since im in principle able to specify what permissions the apk should require in the manifest file.
     
  4. SWhite

    SWhite Newbie
    Rank:
    None
    Points:
    16
    Posts:
    17
    Joined:
    Apr 15, 2010

    Apr 15, 2010
    17
    1
    16
    Student, Developer
    Louisiana
    the apk is the precompiled executable.

    i would assume the same but as foggy as the api explanations are i wouldnt be surprised if something funny happens behind the scenes that ends up with the entire app being installed on the sd card.

    im off to bed but ill check back in the morning. good luck

    the two problems may end up being related. put the apk on the phone in whatever way you notice working apps are set up. if they have their own directory then make one for your app etc.
     

Share This Page

Loading...