public void onContacts(View v)
{
Intent i=new Intent(Intent.ACTION_VIEW, ContactsContract.Contacts.CONTENT_URI);
startActivity(i);
}
public void onBrowse(View v)
{
String s1= et1.getText().toString();
Intent i= new Intent(Intent.ACTION_VIEW, Uri.parse(s1));
startActivity(i);
}
public void onSearch(View v)
{
String s1= et2.getText().toString();
Intent i=new Intent(Intent.ACTION_WEB_SEARCH);
i.putExtra(SearchManager.QUERY, s1);
startActivity(i);
}
public void onMap(View v)
{
String s1= et3.getText().toString();
Intent i=new Intent(Intent.ACTION_VIEW,Uri.parse("geo:0,0?q="+s1));
startActivity(i);
}
이들 각각은 각각의 버튼에 연결된 몇 가지 방법이 버튼 중 하나를 클릭에 그것이 어떤 editext 부착되지 않은 onContacts()
방법 제외한 ActivityNotFoundException
를 도시하는 ...안드로이드 : ActivityNotFoundException
로그 캣 결과 :
05-27 23:18:42.984: E/AndroidRuntime(714): Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=google }
의 AndroidManifest.xml
이 도울 수 있다면691,363,210
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.AllIntent"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INSTALL_LOCATION_PROVIDER" />
<uses-permission android:name="android.permission.CALL_PHONE"/>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:label="@string/app_name"
android:name=".AllIntentActivity" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
내가 방법에서 제공되는 필요한 자원, 즉 어떤 문자열이 글고 치기 그가에서 검색되지 않습니다 동일한 기능을 가진 프로그램을 실행 한 .. 참조 itshelf
사람에 대한
소스 코드 말하고 난에 대한
public void onContents(View v)
{
Intent i=new Intent(Intent.ACTION_VIEW,ContactsContract.Contacts.CONTENT_URI);
startActivity(i);
}
public void onBrowser(View v)
{
Intent i= new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
startActivity(i);
}
public void onSearch(View v)
{
Intent i=new Intent(Intent.ACTION_WEB_SEARCH);
i.putExtra(SearchManager.QUERY, "tapu");
startActivity(i);
}
public void onMap(View v)
{
Intent i=new Intent(Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=hyderabad"));
startActivity(i);
}
public void onCall(View v)
{
Intent i=new Intent(Intent.ACTION_CALL,Uri.parse("tel:9776215312"));
startActivity(i);
}
에 당신이 당신의 글고을 통해 올바른 URI를 전달 하시겠습니까? – eternay