마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

안드로이드 회원가입 코드 작성중 에러가 발생합니다

0 추천

android.content.ActivityNotFoundException: no Activity found to handle intent{act=http://~~~~:~~~/RestService/RestServiceImpl.svc/cat = [xxx] (has extras)} -> 에러

    
HttpClient client;
EditText  id, pwd, name;
    EditText[] value = { id, pwd, name };
WifiManager.WifiLock wifiLock;
Intent intent;
ReadData rd;
ReadData2 rd2;
SendRssi sendrssi;
WifiManager wifiManager;
Context context;
AccessPoint UsingAP;
boolean IsRunning;
final static String URL = "http://~~~~~:8080/RestService/RestServiceImpl.svc/Regist";
MemberDTO dto;
 
   public RelativeLayout RL;
 
    //스크린 크기----------------------------------------------
   public int screenWidth;
   public int screenHeight;
protected Object device;
 
@Override
protected  void onCreate(Bundle savedInstanceState) {
 
        super.onCreate(savedInstanceState);
        setContentView(R.layout.join2);
        setTitle("Join Member");
        findViewById(R.id.regist).setOnClickListener(listener);
        findViewById(R.id.back).setOnClickListener(listener);
        id = (EditText) findViewById(R.id.id1);
        pwd = (EditText) findViewById(R.id.pwd1);
        name = (EditText) findViewById(R.id.name1);
        wifiManager = (WifiManager) this.getSystemService(Context.WIFI_SERVICE);
    UsingAP = new AccessPoint();
UsingAP.setSSID("AP-CENTER");
UsingAP.setMacAddress("~~~~~");
UsingAP.setPassword("~~~~~");
}
 
    OnClickListener listener = new OnClickListener() {   
 
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
String url = URL;
 
   switch (v.getId()) {
     case R.id.regist:
   
    try{
    try{
 
    Intent intent = new Intent("http://~~~~~~~/RestService/RestServiceImpl.svc/");
    intent.addCategory(intent.CATEGORY_DEFAULT);
   
    intent.putExtra("id",  id.getText().toString());
    intent.putExtra("pwd", pwd.getText().toString());
    intent.putExtra("name", name.getText().toString());
 
       startActivity(intent);
   
    }
    catch(Exception e)
    {
    Log.d("join","왜냐?");
    printToast(e.toString());
    }
    }
    catch(Exception e)
    {
    printToast(e.toString());
    }
   
     break;
     case R.id.back:
          finish();
          break;
  
}
}
};
public JSONArray getPersonsData() throws ClientProtocolException, IOException, JSONException
{
String ID1,PW1,NAME1;
ID1 = id.getText().toString();
PW1 = pwd.getText().toString();
NAME1 = name.getText().toString();
if(ID1.getBytes().length<=0 || PW1.getBytes().length<=0 || NAME1.getBytes().length<=0){
ID1 ="0";
PW1 ="0";
NAME1 = "0";
}
    HttpGet get = new HttpGet(URL+ID1+"/"+PW1+"/"+NAME1);
    HttpResponse response = client.execute(get);
    int status = response.getStatusLine().getStatusCode();
 
    if(status == 200) //sucess
    {
        HttpEntity e = response.getEntity();
        String data = EntityUtils.toString(e);
        JSONArray personsData = new JSONArray(data);
 
        return personsData;
    }
    else
    {
    printToast("FAIL1 !!!");
 
        return null;
    }
 
}
}
     <activity android:name=".MemberDTO"
       android:label="@string/app_name">
       <intent-filter>
                <action android:name="android.intent.action.MAIN" />
 
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
    </activity>
 
제발 도와주세요... 잘 가는지도 잘 모르겠어요..ㅠㅠ
   
아오쿠르 (900 포인트) 님이 2015년 7월 27일 질문
아오쿠르님이 2015년 7월 27일 수정

1개의 답변

+1 추천
 
채택된 답변
Intent intent= new Intent(Intent.ACTION_VIEW, Uri.parse("http://~~~~~~~/RestService/RestServiceImpl.svc/"));
intent.putExtra("id",  id.getText().toString());
intent.putExtra("pwd", pwd.getText().toString());
intent.putExtra("name", name.getText().toString());
startActivity(intent);
 
요렇게 사용해보세요,
 
 
 
ㅁㄴㅇㄻㄴㅇㅎ 님이 2015년 7월 28일 답변
아오쿠르님이 2015년 7월 31일 채택됨
...