NoScreenNoWifi

Quickly share your Android Code Snippets here...

NoScreenNoWifi

Postby Xylez » Tue Aug 03, 2010 6:13 pm

Code: Select all
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        setContentView(R.layout.main);
       
        wifiis = (TextView)this.findViewById(R.id.wifiis);
        enordis = (TextView)this.findViewById(R.id.enordis);
        enable = (TextView)this.findViewById(R.id.enable);
       
        WifiMan = (WifiManager) getSystemService(Context.WIFI_SERVICE);
        Info = WifiMan.getConnectionInfo();
       
        enordis.append(Info.toString());
       
        enordisCheckBox = (CheckBox)this.findViewById(R.id.enordisCheckBox);
        enordisCheckBox.setOnClickListener(this);
    }


This is the code i'm having so far, but when i'm trying to run it on my emulator it get an error saying the program isn't working anymore + these 2 lines in the Eclipse console:
Code: Select all
[2010-08-03 19:12:20 - An WiFi] WARNING: Application does not specify an API level requirement!
[2010-08-03 19:12:20 - An WiFi] Device API version is 7 (Android 2.1-update1)


The project and the emulator are both Android 2.1 Update1

Why aint this working?
Xylez
Freshman
Freshman
 
Posts: 4
Joined: Tue Aug 03, 2010 3:45 pm

Top

Re: NoScreenNoWifi

Postby v1nsai » Mon Aug 09, 2010 7:35 am

Add this to your AndroidManifest.xml, outside the <Application> tags (usually after)
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. <uses-sdk android:minSdkVersion="7" />
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


Also, this probably belongs in one of the problems sub-forums.
# cat /etc/signature/funny
User avatar
v1nsai
Developer
Developer
 
Posts: 26
Joined: Mon Aug 09, 2010 3:29 am

Top

Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 12 guests