Questions tagged [android-intent]

0

votes
0

answer
6

Views

How access pictures after they have been taken by camera used by other app

I have an idea for an android service, and I need to be able to access pictures before they're being taken, to save GPSlocation, moreover, I need also an access to the picture immediately afterwards. Is there any proper way to do it ?
adam17238
1

votes
1

answer
374

Views

How to stop a VpnService that was called with prepare() and startService()?

I't trying to implement a local VpnService to have my app do some tasks, but I'm a little confused as to how to stop it one it started. The VpnService class and client activity are based on this repo: https://github.com/hexene/LocalVPN The caller activity is basically this: public class MainActivity...
DmitryB
0

votes
0

answer
3

Views

Getting black screen for 3 seconds when moving to another activity?

I am working on an app which on moving from Activity 'A' to another Activity'B' shows black screen for 2 to 3 seconds. I am performing calculation on huge amount of data in Activity 'B', so on moving to Activity 'B' due to load on mainUI it gives black screen to load. But when i move my calculation...
dan walker
1

votes
1

answer
145

Views

Start path when using Intent.ACTION_OPEN_DOCUMENT_TREE

Is it possible to specify an 'start path' when using Intent.ACTION_OPEN_DOCUMENT_TREE ? When I use it like this: Intent chooseFolderIntent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE); startActivityForResult(Intent.createChooser(chooseFolderIntent, getString(R.string.save_to_directory)), CHOOSE_FO...
sports
1

votes
2

answer
79

Views

Why cannot I attach a file in Android N+?

I'm developing an App that is exporting some HTML tables as attachments. I have noticed that my code doesn't work if I try to attach the html table to Gmail, Google Drive or any E-mail provider in Android N+, but it can upload the file to OneDrive, WhatsApp, Skype, etc. Without any issue. This is my...
Federico Navarrete
1

votes
4

answer
6.8k

Views

Android certificate (can not install app by using apk file)

I developed an Android app. I then transferred the bin/myapp.apk to my android phone, and try to install it. But my phone says it can not be installed. Someone told me it is probably because of the Android certificate in my app is wrong. But I do not understand what is Android certificate ? Is it so...
Leem.fin
0

votes
0

answer
5

Views

Android - onHandleIntent of IntentService is never called

My android application declares in AndroidManifest.xml a service responsible for displaying error messages for the whole system. In the application class is declared a global exception handler. public class DetectxApp extends Application { @Override public void onCreate () { super.onCreate(); Threa...
araraujo
1

votes
1

answer
1k

Views

Android app crashes when calling any explicit intent (like camera/gallery, call or share) on Samsung galaxy s3

I have compileSdkVersion and targetSdkVersion 23 and testing on Samsung galaxy s3. But whenever i open any third party app (explicit intent) like camera/gallery app or share intent (gmail, email) or dialer app and comeback to my app by pressing back button or (in case of camera/gallery app by select...
Nouman Bhatti
1

votes
3

answer
37

Views

in Samsung device (SM-J200F-sdk 22) app crashes when calling intent for ACTION_VIEW (geo / map) But Works on many other devices! any solution?

the error comes from this lines of code : Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse('geo:' + mission.Customer.Lat + ',' + mission.Customer.Lng)); startActivity(intent); this is the error :
tahaDev
1

votes
1

answer
33

Views

Camera intent with image only option

I am trying to add camera intent to my app, I would like to give the user only option to take pictures (Not video), is there a way to hide the video button from the camera: Intent intent = new Intent('android.media.action.IMAGE_CAPTURE'); only disables the button but its still being shown, Thanks!
Coder123
1

votes
5

answer
61

Views

How to keep intent for second activity?

I have a MainActivity with some cards which have different names. onClick, the title is passed as an intent via the adapter to the secondActivity and displayed as the header. From there, I can go to other activities. If I come back from one of these other activities (via the back button created by e...
Jana L
1

votes
1

answer
445

Views

intent.getParcelableExtra() working on API 23 but not on API 25

I am having this weird problem where the intent.getParcelableExtra() is working fine on API 23 but not on API 25, it is returning NULL. Here is how I reproduced the problem with less code: User class as example: public class User implements Parcelable { private String name; private int age; public U...
hiddeneyes02
1

votes
0

answer
76

Views

Add items to my list using Google Assistant

I have a shopping list app and I want to create a new list and add items to the app using voice on Google Assistant as below image. There are intents that are supposed to add items to a list. How can I implement them? And associate 'create a list' to my app? PS: On iOS, I used Sirikit with the inte...
yasin
1

votes
1

answer
8

Views

Sending data from three different text view in main activity to one text view in another activity

I have three text view and three button associated to text views in main activity and one text view in second activity. I want to transfer data to text view when any of the button clicked.
AZIM MOHAMAD
1

votes
0

answer
338

Views

About Intent.FLAG_GRANT_READ_URI_PERMISSION lifecycle

https://developer.android.com/reference/android/support/v4/content/FileProvider.html As the document said Permissions granted in an Intent remain in effect while the stack of the receiving Activity is active. When the stack finishes, the permissions are automatically removed. Permissions granted to...
Wesly.Wang
0

votes
1

answer
6

Views

How to get Task to call pendingIntent

I've been trying to pass a pendingIntent to the Activity Recognition Client as part of a Task, however the pendingIntent doesn't seem to be being called. I'm using Google's Activity Recognition Client (https://developers.google.com/android/reference/com/google/android/gms/location/ActivityRecognitio...
Matt
1

votes
1

answer
254

Views

How can we access data in service passed from activity using bundle ?

In Activity: Intent service = new Intent(OverlayShowingService.this, shortLayer.class); service.putExtra('prevact','overlayService'); startService(service); stopService(service); What is Bind service? Were can I access my data from activity ? What did I made a miskake? In service: @Override public I...
kamalesh kunwar
1

votes
0

answer
97

Views

Camera intent not working: it enters catch block and says “could not create file!”

problem in opening camera intent in android import android.app.Activity import android.content.Intent import android.graphics.Bitmap import android.graphics.BitmapFactory import android.os.Bundle import android.os.Environment import android.provider.MediaStore import android.support.v4.content.Fil...
Master Guy
1

votes
2

answer
88

Views

not able to make a button visible from another activity

I created an image gallery app. My requirment:When I click on buttoncut in a activity(PhotosActivity.java), buttonpaste should become visible and it should remain visible when I go back to another activity(ImageGallery.java) so that I can use it for moving pictures to another folder. What is hap...
red viper
1

votes
1

answer
451

Views

onHandleWork never receives intent from pending intent Geofencing

I am working on a Geofencing application. The JobIntentService subclass that handles the GeofenceTransitions never receives the intent. I am receiving location updates at one minute interval then creating a new geofence list then adding the geofences based on a user's current location. Here's my And...
1

votes
2

answer
100

Views

Differences between FrangmentTransaction and Intent

As taught by Udacity, typically one should use an intent to start a new activity (which presumably shows new/different information). But, for the project I'm currently working on I've been using FragmentTransaction to show different areas of the app. I figure this would lead to a smaller apk (b/c no...
1

votes
1

answer
77

Views

Store Bundle with extras in MainActivity

As a novice Android/Java developer, I hope this is not a trivial question. I've been struggling with it for hours now though, so I hope to get some pointers. I am actually developing an alarm/timer application with multiple intervals for a specific timing purpose. My idea is to create a Bundle with...
reynard80
1

votes
0

answer
185

Views

Android - Start Activity on Phone Boot Not Working

I'm trying to add a BroadcastReceiver to my program that will launch my MainActivity when the BOOT_COMPLETED action is detected. I've tried everything here and here and it refuses to work. I am running Android 5.1.1, API 22. AndroidManifest.xml In the , I've tried using both BOOT_COMPLETED and QUI...
Eirhardt
1

votes
0

answer
153

Views

Xamarin Android Sharing Intent under Marshmallow

In my Application I try to share an Image with the Intent (Intent.ActionSend). For the guaranteed Access I use a Fileprovider which creates the Uri to the file. Under Android Nougat my code works but with Marshmallow not. It shows no errors but the Image is not sent to the recieving App. The Output...
ToVo
1

votes
2

answer
89

Views

SMS broadcast receivers don’t work after phone restart

We are trying to build our autoresponder app with SDK 26 as a target version. We have 2 PhoneStateReceivers in our app (see code below). Also we are requesting permissions: android.permission.READ_SMS android.permission.READ_PHONE_STATE and user accept it. But after phone restart and before the us...
M.Gin
1

votes
2

answer
29

Views

How to modify the name of the class (variable instead of hardcoded) in Intent?

final Button voteYes = (Button) findViewById(R.id.voteYes); voteYes.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent successPhase = new Intent(player1.this, player5.class); startActivity(successPhase); } }); I have a integer variable that ranges from 1 t...
buzzerbeater27
1

votes
2

answer
92

Views

Unmarshalling unknown type code XXXXX at offset YYY when using getIntent().getExtras().getInt() [duplicate]

This question already has an answer here: java.lang.RuntimeException: Parcel android.os.Parcel: Unmarshalling unknown type code 1 answer I'm trying to pass an int value from activity A to activity B. Activity A: Intent intent = new Intent(ActivityA.this, ActivityB.class); intent.putExtra('list_size...
cod3min3
1

votes
0

answer
65

Views

Login Module doesn't work

I am developing an android application with help of: https://www.youtube.com/watch?v=T7Z4GVFaT4A&list=PLe60o7ed8E-TztoF2K3y4VdDgT6APZ0ka&index=4 When I reciprocated the same tutorial, the application worked absolutely fine. Then I modulated the application to fit into my application idea. The Regist...
M.S.Sudha
1

votes
2

answer
95

Views

Clicking a button in an activity opens up two activities simultaneously

Here I have three activities where one of them is a login activity. Whenever I click the login button two activities show up simultaneously. The other two activities are : VendorAccount.java and Promotion.java. The code is given below : Here I have used an intent that whenever the task of logging i...
Pritom Mazumdar
1

votes
0

answer
177

Views

callback for createChooser

I am trying to share image and text to different apps on the mobile. I have created an IntentChooser to select app to share the content with and a Broadcast Receiver to get the callback on what the user clicked. Now problem is with Facebook. I want to share a hashtag but its not going through Intent...
XoXo
1

votes
2

answer
286

Views

How to open gallery in specified folder using intent

Can you help me how to open gallery in specified folder using intent? It only opening gallery from specified folder like this (screenshot below). However, it is not returning any value or activity. I've try a lot of methods, but none open the specified gallery folder I tried Intent intent = new Inte...
RIYANDI SAPUTRA
1

votes
0

answer
209

Views

FileObserver not working with intent

I need to use camera intent and keep track of the new images taken by the intent. As I need to take multiple photos at a time, I used the intent MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA. Here is my code: package com.arko.cameraintent; import android.content.Intent; import android.os.Environment;...
Preetom Saha Arko
1

votes
1

answer
251

Views

File last modified time from Android URI provided by Intent.ACTION_OPEN_DOCUMENT

I need to write an Android app that observes when a file is modified by another app and then reads data from it. The file is chosen by the user. So I want to use Intent and what ever file chooser is available on the device for the user to select the file. Doing this using Intent.ACTION_OPEN_DOCUMEN...
hubbabubba
1

votes
2

answer
265

Views

Receiving Simple Data Through Intent for Android App while App is in background

I have an app that receives simple data (text) from other apps through the other app sharing to my app. Part of the manifest looks like this: When the activity hasn't been created yet, I share the text data from the other app to my app and handle the intent with action intent.action.Send in the onCr...
shusnain
1

votes
1

answer
40

Views

How to inspect ContentProvider available for Intent (or block specific one)

I use the Intent mechanism to have the user select an image via the standard way val intent = Intent(Intent.ACTION_GET_CONTENT) intent.type = 'image/*' intent.addCategory(Intent.CATEGORY_OPENABLE) ctx.startActivityForResult(intent, RequestCodes.SelectPhoto) then I pass the Uri to another activity to...
androidguy
1

votes
0

answer
35

Views

Why would an intent to open an external browser window not work, and instead open within the web view?

I have an Android SDK that uses a web view to show some pages, but depending on the requested link, I have it open an external browser. I am using the WebView's shouldOverrideUrlLoading method, and if it's a link to be opened externally, I use: Intent i = new Intent(Intent.ACTION_VIEW); i.setData(Ur...
timetofly
1

votes
0

answer
170

Views

Send share live location intent from 3rd party app to Whatsapp

With the new WhatsApp feature which is Sharing Live Location, I am wondering if there is any way to send an intent to the WhatsApp app from my Android app. I am aware of an existing method provided which is sending intent, but it’s only to accommodate sending some texts.
Achmad Naufal Syafiq
1

votes
0

answer
14

Views

ActivityNotFoundException after queryIntents.size > 0 for Calendar App

I have a Intent for the Calendar app and was reporting runtimeexception with activitynotfound. The solution was to add queryIntents before start Activity, but it is still reporting the same error and it is resolving to true in the if in the new app version. Intent intent = new Intent(Intent.ACTION_I...
Marcos Vasconcelos
1

votes
0

answer
52

Views

Deciding which activity to open on notification click

I'm currently trying to find out, how to specify the destination activity on click on an android notification - but not until actually clicking the notification. I have the following use case: I have an app where the user has to log in before using it. So if the user receives a notification from my...
daco
1

votes
0

answer
905

Views

How to open file manager and select specific file type in my app?

I use the following code in my Android app to open the gallery and select a video file. Now I want to modify this code to open the file manager, and select a file of specific type ( for example *.xyz). How can I do this !? public View.OnClickListener btnChoosePhotoPressed = new View.OnClickListener(...
Omid1989

View additional questions