Camera activity returning null android

I am building an application where I want to capture an image by the default camera activity and return back to my activity and load that image in a ImageView. The problem is camera activity...

How to Programmatically Enable/Disable Accessibility Service in Android

I would like to programmatically enable/disable Accessibility Services listed under Settings->Accessibility option. I could start Accessibility Intent like below: Intent intent = new...

How to send multiple images to server using MultipartEntity from android

I am sending Images and Text to a PHP webservice using the following code. try { HttpClient httpClient = new DefaultHttpClient(); HttpContext localContext = new BasicHttpContext(); HttpPost...

Bluetooth on Android: StartDiscovery not working. Cannot scan devices

I am new to android and i am making an application with bluetooth functionalities. I am able to set the bluetooth adaptor, an fetch my own device information, but i could not use startdiscovery to...

Select multiple images from android gallery

So basically what i am trying to achieve is opening the Gallery in Android and let the user select multiple images. Now this question has been asked frequently but i'm not satisfied with the...

Sqlite Database - How to save Image taken from camera intent as well as hashmap to sqlite to retrieve later?

I am having endless problem with my app, I am busy making an app where the user can take a picture from the point tapped on the map and return with an image, all Of that works a 100% but, the...

Android: How to upload a file to OneDrive?

Iam trying to upload a file using the OneDrive Saver sample app. Instead of creating a text file, I would like to select a file from the gallery and then upload it to OneDrive. I have edited the...

How to select a video from the gallery and get it's real path?

I can open the gallery with this code, Intent intent = new Intent(Intent.ACTION_PICK); intent.setType("video/*"); intent.setAction(Intent.ACTION_GET_CONTENT); ...

onclicklistener in fragment with intent

I have an an Android app with an Intro class. This Intro class has got three fragments. in fragment 3 (IntroPage3) i would like to set an onclicklistener with an intent form the IntroPage3 to...

How can I set the size of Image when imported in Android?

I am using the following code to let a user import an image from their gallery into the app. public void loadImagefromGallery(View view) { // Create intent to Open Image applications like...

dialog - The specified child already has a parent. You must call removeView() on the child's parent first

After a check demanding the user to switch on internet services and I try to click on a button my app crashes with the error message java.lang.IllegalStateException: The specified child already...

How to get the file extension in Android?

I am a newbie. I have an EditText and a Browse Button to explore Folders and select files only. From the Browse Button, when a file is clicked it stores the folder path in which that file is in...

get a contact phone number crash

i am trying to make a user choose a contact and retrieve his phone number. i found the following code in https://developer.android.com //the onClick function for the user to pick his...

Why onActivityResult always returns null values for Intent extra

My onActivityResult method on activity always returns null for Intent extra. I'm directly calling these methods on activities. please help to find a solution for this. private void...

resultCode 0 and data zero in onActivityResult

I have activity with one fragment, and then that fragment call some activity which that activity will give some value into first activity. i use onActivityResult but i don't know why resultCode...

Login Page will not open profile activity

After a user registers in the signup activity page I want them to be able to press the login button in the login page and then for the app to go to a profile activity page. However, the app...

Nougat: Error while "Cropping the image and show in ImageView"?

I am facing the below error in case of android version Nougat after capturing the image and showing in imageview but it is working in marshmallow.I have created Fileprovider path which is required...

GoogleAuthIOException when trying to get files list in appDataFolder

I'm trying to save app database to the Apps folder on Google Drive. I'm using Drive v3 API. A few months ago all working fine and data successfully saving to user appData folder. But for now, I'm...

How to disable NDEF tag discovery permanently in an Android app not just for an Activity?

We have an app that is used to simulate POS terminal, i.e. it communicates with debit/credit cards via NFC. In all the app activities I am using: nfcAdapter.enableReaderMode(this, ...

Android Google Sign In Failed com.google.android.gms.common.api.ApiException: 12500

So I'm trying to use Google Sign In Authentication using Firebase as provide by this link : https://firebase.google.com/docs/auth/android/google-signin?hl=en I followed every single step including...

Android Bluetooth StartDiscovery() always returns false

I am trying to discover bluetooth devices nearby, but startDiscovery() always returns false, as if it is not working. Therefore it is not able to find devices. I saw that i have to include...

How to open specific folder in the storage using intent in android

I have tried so many answers related to this question but didn't work any of them. this my code but it didn't open the myFile folder. Please help me to resolve this issue val intent =...

Getting error "You have exceeded the maximum transaction amount set by your bank" when calling Google Pay intent from my android app

I am facing this weird problem with my Google pay integration in android app. When I am sending an amount more than 2000(INR) I am getting the error "You have exceeded the maximum transaction...

Android App crash due to Image capture only in specific devices(One plus 6T)

I am building an Android app that includes collecting customer data in different categories ,in different screeens(Activities). The data entered by the user(all input fields) are stored in Global...

Print Arabic characters in android Thermal Printer

Printer is GoojPRT portable printer PT-210 (thermal printer) the same code is work on another thermal printer POS but not work on this printer for Arabic characters the English characters is good...

Android google pay integration failed, not showing the payment confirmation page

I am trying to integrate google pay in my android app. The issue is that after completing the transaction, google pay app again redirects to the proceed to pay page, not showing the confirmation....

startActivityForResult is deprecated and, unable to request for bluetooth connection with new code

Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT); I was requesting to start Bluetooth using above source code....

Captured Image is not storing in android 11

I'm unable to store captured image in (getExternalFilesDir(Environment.DIRECTORY_PICTURES)) android 11 device. I have...

contact picker doesn't work on Android 11

I have problem that contact picker code works fine on any android version below 11, but when i test it on android 11 i have this error: 2021-08-05 10:15:47.617 9338-9338/com.tortohub W/System.err:...

How to fetch files inside hidden folder using Media Store API on Android 11

I need to fetch data inside WhatsApp folders on External Storage. As i am targeting API Level 30 i am no longer able to access WhatsApp folders on External Storage. I have implemented Storage...