Passing data through intent for onActivityResult

Im trying to save a pdf file on a user-picked location but Im having problems passing data through the intent. I tried using a bundle to pass the info but it is always null. It only works if I add a local variable and assign it in the @save method. But I want to pass… Read More Passing data through intent for onActivityResult

How to open a pdf using android_intent_plus in flutter?

I have a .pdf on download android folder, and I want to open it with flutter. I tried: final AndroidIntent intent = AndroidIntent( action: ‘android.os.Intent.ACTION_VIEW’, //android.os.Intent.ACTION_VIEW action_view data: Uri.encodeFull("/storage/emulated/0/Download/myfile.pdf"), // content:// file:// //type: "application/*", flags: [ Flag.FLAG_GRANT_READ_URI_PERMISSION, Flag.FLAG_GRANT_PERSISTABLE_URI_PERMISSION, Flag.FLAG_ACTIVITY_NEW_TASK ]); intent.launch(); But I get the following error: V/IntentSender( 8997): Sending intent Intent { act=android.os.Intent.ACTION_VIEW dat=/storage/emulated/0/Download/myfile.pdf… Read More How to open a pdf using android_intent_plus in flutter?

intent.getStringExtra() returns null

Im trying to send data class object to another activity with intent but it returned null so i tried sending simple string but it still returns null, i couldn’t find what is the problem. Here is my code code in LoginScreen.kt val intentUser = Intent(this@LoginScreen,HomeActivity::class.java) val string = "intent" intentUser.putExtra("intent",string) startActivity(intentUser) finish() and code in… Read More intent.getStringExtra() returns null

Android:App crashes when i try to retrieve data from intent

In activity 1: package com.example.project1; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.RadioButton; import android.widget.RadioGroup; import android.widget.Spinner; import android.widget.Toast; public class MainActivity extends AppCompatActivity { private Button button1, button2; private RadioGroup rd; private RadioButton checkmass, checktemp, checklen; public int val = 0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); button1… Read More Android:App crashes when i try to retrieve data from intent