I am getting several errors and can't discover which is causing the problem.
Errors:
- Cannot resolve symbol
- Unexpected Token (while loop)
- Unknown class "x"
How can I set the textView to display the wifiSignal strength?
Sorry for not narrowing down the problem more, but I am new to developing in android studio and am too lost to be specific.
Thanks so much for any help you can provide!
Code:
package com.example.a18lts01.wificompass;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
} }
class wifi
{
@Override
public void run() {
}
int x = 1;
while(x == 1)
{
int signalLevel = result.level;
TextView.setText(signalLevel + "db");
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
Thread myThread = new Thread(myRunnable);
myThread.start();
}
}
}