Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to start viber using intent in android
    primarykey
    data
    text
    <p>I want to use <code>Viber's</code> Intent for Android.</p> <p>I am trying to implement that using the following code, but it is not working.</p> <pre><code>Intent intent = new intent(Intent.ACTION_SEND); intent.setType("text/plain"); String text = MyOutputText.getText().toString(); intent.setPackage("com.viber"); </code></pre> <p>Can anyone tell me where I am going wrong? </p> <p>Here is my error Log:</p> <hr> <pre><code>06-05 15:16:27.495: E/AndroidRuntime(29956): FATAL EXCEPTION: main 06-05 15:16:27.495: E/AndroidRuntime(29956): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SEND typ=text/plain pkg=com.viber } 06-05 15:16:27.495: E/AndroidRuntime(29956): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1535) 06-05 15:16:27.495: E/AndroidRuntime(29956): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1387) 06-05 15:16:27.495: E/AndroidRuntime(29956): at android.app.Activity.startActivityForResult(Activity.java:3195) 06-05 15:16:27.495: E/AndroidRuntime(29956): at android.app.Activity.startActivity(Activity.java:3302) 06-05 15:16:27.495: E/AndroidRuntime(29956): at com.translate.AndroidTranslate$5.onClick(AndroidTranslate.java:174) 06-05 15:16:27.495: E/AndroidRuntime(29956): at android.view.View.performClick(View.java:3627) 06-05 15:16:27.495: E/AndroidRuntime(29956): at android.view.View$PerformClick.run(View.java:14329) 06-05 15:16:27.495: E/AndroidRuntime(29956): at android.os.Handler.handleCallback(Handler.java:605) 06-05 15:16:27.495: E/AndroidRuntime(29956): at android.os.Handler.dispatchMessage(Handler.java:92) 06-05 15:16:27.495: E/AndroidRuntime(29956): at android.os.Looper.loop(Looper.java:137) 06-05 15:16:27.495: E/AndroidRuntime(29956): at android.app.ActivityThread.main(ActivityThread.java:4511) 06-05 15:16:27.495: E/AndroidRuntime(29956): at java.lang.reflect.Method.invokeNative(Native Method) 06-05 15:16:27.495: E/AndroidRuntime(29956): at java.lang.reflect.Method.invoke(Method.java:511) 06-05 15:16:27.495: E/AndroidRuntime(29956): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980) 06-05 15:16:27.495: E/AndroidRuntime(29956): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747) 06-05 15:16:27.495: E/AndroidRuntime(29956): at dalvik.system.NativeStart.main(Native Method) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload