Category : android-intent

Is there any way to stop a service and reveal mainactivity at the same time when user trigger contentIntent. Is it proper way? val intent = Intent(this, AlertDetails::class.java).apply { flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK } val pendingIntent: PendingIntent = PendingIntent.getActivity(this, 0, intent, 0) val builder = NotificationCompat.Builder(this, CHANNEL_ID) .setSmallIcon(R.drawable.notification_icon) .setContentTitle("My notification") .setContentText("Hello World!") .setPriority(NotificationCompat.PRIORITY_DEFAULT) .setContentIntent(pendingIntent) ..

Read more

I come with a question because I can’t find an answer anywhere. I have a login done with firebase and I don’t know how to do ProfileFragment with data (email and id) how to add this code part: val userId = intent.getStringExtra("user_id") val emailId = intent.getStringExtra("email_id") binding.fragUserId.text = "User Id :: $userId" binding.fragEmailId.text = "Email ..

Read more

I made a filemanager and I want it to respond to ACTION_GET_CONTENT intents. So I have this in my FileChooser activity in the AndroidManifest.xml: <intent-filter> <action android:name="android.intent.action.GET_CONTENT" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.OPENABLE" /> </intent-filter> (In fact, in the docs it says that adding <data android:type="image/*" /> serves to choose a photo, but Android Studio ..

Read more

I created an object of the Intent class called receiverIntent, to receive a variable from the previous class: Intent receiverIntent = getIntent(); Then I created a variable called completeName, to receive a variable called "name", through an Intent: String completeName = receiverIntent.getStringExtra("name"); But I want to send this completeName variable to another class without needing ..

Read more

to create an application for a restaurant as an internship, i made an intent to be sent to the command page. however the intent send me a blank page. here is how the code is made: mButtonCommande.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { OpenCommandeActivity(); } }); } private void OpenCommandeActivity() { Intent connect ..

Read more