public class MainService extends Service implements Runnable {
// 객체 생성
private ActionManager actionmanager;
private test tt;
public WebView Webview = null;
public View WebLayout;
public LayoutInflater Inflater ;
public ProgressBar Bar;
public Button Activation_Button;
// 윈도우 매니저 변수
public WindowManager.LayoutParams params;
public WindowManager wm;
Handler handler;
@Override
public IBinder onBind(Intent intent) {return null; }
public void onCreate(){
super.onCreate();
Webview = (WebView) WebLayout.findViewById(R.id.webPopup);
//wm.addView(WebLayout, params);
}
public int onStartCommand (Intent intent, int flags, int startId){
super.onStartCommand(intent,flags, startId);
tt = new test();
tt.Action();
//wm.addView(WebLayout, params);
return START_STICKY;
}
public void onDestroy() {
super.onDestroy();
}
MainSevice라는 서비스 클래스에서 test라는 클래스의 Action() 메소드를 실행할려고합니다. (일부분)
아래는 test 클래스입니다.
public class test {
MainService ms;
public void Action() {
ms = new MainService();
ms.Webview.setFocusable(true);
}
}
MainService 클래스의 웹뷰를 조작하는 메소드인데요. 저런식이 아니더라도 View 조작은 아예 안되네요.
앱을 실행하면 종료 당해요 ㅠ_ㅠ..
저기엔 나오지 않았지만, 모든 View 에 적당한 값을 넣어둔 상태입니다.
예 ( Webview = (WebView) WebLayout.findViewById(R.id.webPopup); )
Ui View 건들지만 않으면 실행도 잘되고 오류도 없습니다.
근데 다른클래스의 UiView 관련 메소드를 실행하면 바로 맛이 가네요 ㅠㅠ..
스레드랑 핸들을 이용해서도 해봣는데요.. 안되네요..
혹시 MainService 서비스의 Ui View를 다른 클래스에서 조작할수있는 방법이 있나요?
다른클래스에 Ui 관련 코드를 넣고 메인서비스에서 불러오면 무조건 오류가 납니다..
몇일쨰 이것땜에 업무가 안되고있어요 ㅠㅠㅠ 방법좀 알려주세요 ㅠㅠ
아래는 디버깅해서 찾은 오류 정보에요 !


