i am unable to pass text using intent to another activity. unfortunately you app has stop

I try to pass data using intent and i keep getting error. everything else is working except for the intent 05-16 12:58:15.624 15880-15880/com.example.user.talk E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.user.talk, PID: 15880 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.user.talk/com.example.user.talk.UpdateActivity}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2318) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2396) at android.app.ActivityThread.access$800(ActivityThread.java:139) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1293) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:149) at android.app.ActivityThread.main(ActivityThread.java:5257) at java.lang.reflect.Method.invokeNative(Native Method) … Continue reading “i am unable to pass text using intent to another activity. unfortunately you app has stop”

How to get click event in android direct share

I’ve implemented Direct Share in my android app. Its working fine but the problem is I want to get click event means if I click on facebook then how will I know that facebook was clicked. Because I want to implement ShareLinkContent when the user clicks on Facebook. This is what I’m doing for direct … Continue reading “How to get click event in android direct share”

Use intent to select files to read in android

Use intent to select files to read in android I use the intent to get the file path of my choice as follows: Intent inputFile = new Intent(Intent.ACTION_PICK); inputFile.setType(“*/*”); inputFile.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(inputFile.createChooser(inputFile, “Select csv”),1010); But the path received does not use FileInputStream to read it. Eg: path received via intent is: /document/primary:File.csv The desired path to … Continue reading “Use intent to select files to read in android”

App keeps crashing after button click

I’m making a simple app and when I press a button that has an onClick() it crashes. I’m trying to open another activity on the button click. Here’s my onClick method from MainActivity.java: public void gameActivity(View view){ Intent intent = new Intent(MainActivity.this, GameActivity.class); MainActivity.this.startActivity(intent); } Here’s my Button code from activity_main.xml: <Button android:id=”@+id/play_button” android:layout_width=”wrap_content” android:layout_height=”wrap_content” … Continue reading “App keeps crashing after button click”

Samsung galaxy S7 cant open camera

I found a bug in my app. the camera intent is not opening only in Samsung s7. the permission is granted on runtime and i doublechecked that its really granted in the phone. still i cant open camera to take picture or open picture. any ideas? private void takePicture() throws IOException { // Create the … Continue reading “Samsung galaxy S7 cant open camera”

Error:Execution failed for task ':app:mergeDebugAssets'

I’m trying to make an app in Android Studio that opens a PDF file saved in the assets folder of the app when I tap a button. It opens the PDF through a 3rd-party app via intents. I’m getting this error when I try to run it: Error:Execution failed for task ‘:app:mergeDebugAssets’. java.lang.NullPointerException (no error … Continue reading “Error:Execution failed for task ':app:mergeDebugAssets'”

How to parse data from one Activity to another activity as long as the HashMap is using intent

i’m trying to parse data from one Activity to the Other. The data which i would like to parse are from the following HashMap: ImageButton map = (ImageButton) findViewById(R.id.mapbtn); map.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent i = new Intent(Locations.this, MapsActivity.class); for (final HashMap<String, String> contact : contactList) { String names = … Continue reading “How to parse data from one Activity to another activity as long as the HashMap is using intent”

How to start activity through my app in another app?

I am very new to writing android app, I am trying to start specific activity from an other app (App B)through my app (App A). I know how to launch the App B but I need App B do some specific task with a click of button without showing the launching process I just want … Continue reading “How to start activity through my app in another app?”