android-contentprovider

How to update metadata of audio file in Android Q media store?

情到浓时终转凉″ 提交于 2020-05-21 21:38:13
问题 Updating metadata of audio file in media store is not working in Android Q OS, it works in all other OS. I am using content provider with uri specified as MediaStore.Audio.Media.EXTERNAL_CONTENT_URI. It is working fine in all below Android Q device. Below is the code that I am using to update track metadata. ContentValues cv = new ContentValues(); ContentResolver resolver = getContentResolver(); Uri uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; cv.put(MediaStore.Audio.Media.TITLE,

How to update metadata of audio file in Android Q media store?

白昼怎懂夜的黑 提交于 2020-05-21 21:35:28
问题 Updating metadata of audio file in media store is not working in Android Q OS, it works in all other OS. I am using content provider with uri specified as MediaStore.Audio.Media.EXTERNAL_CONTENT_URI. It is working fine in all below Android Q device. Below is the code that I am using to update track metadata. ContentValues cv = new ContentValues(); ContentResolver resolver = getContentResolver(); Uri uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; cv.put(MediaStore.Audio.Media.TITLE,

How to obtain Skype ID from Contact DB on Android (my solution is almost OK)

浪尽此生 提交于 2020-05-14 09:10:43
问题 Summary I am able to obtain 'Skype ID' / 'Skype user name' , but my solution does not always work because it seems the contact DB of the Skype app does not always contain (expose?) 'all' the data. Let me explain the situation before asking my question: 1 - Gathering info from Skype apk Skype App (apk) contains /res/xml/contacts.xml which contains <ContactsDataKind android:icon="@ref/0x7f0e0004" android:mimeType="vnd.android.cursor.item/com.skype4life.audio" android:summaryColumn="data3"

How to obtain Skype ID from Contact DB on Android (my solution is almost OK)

我与影子孤独终老i 提交于 2020-05-14 09:08:12
问题 Summary I am able to obtain 'Skype ID' / 'Skype user name' , but my solution does not always work because it seems the contact DB of the Skype app does not always contain (expose?) 'all' the data. Let me explain the situation before asking my question: 1 - Gathering info from Skype apk Skype App (apk) contains /res/xml/contacts.xml which contains <ContactsDataKind android:icon="@ref/0x7f0e0004" android:mimeType="vnd.android.cursor.item/com.skype4life.audio" android:summaryColumn="data3"

Android :Programmatically updated contact is not syncing with other apps

允我心安 提交于 2020-04-30 06:29:11
问题 When a contact is updated with batch operation "context.getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);" then other apps like WhatsApp does not take updates automatically. For example, If mobile number is updated/removed as:- String deviceNumber= "+1 (234) 56789"; String oldTrimmed= "+123456789"; String where = ContactsContract.CommonDataKinds.Phone.NUMBER + " = ? OR " + ContactsContract.CommonDataKinds.Phone.NUMBER + " = ? AND " + ContactsContract.Data.CONTACT_ID + " = ?

What is the Android sent sms intent?

☆樱花仙子☆ 提交于 2020-03-08 09:07:09
问题 Hey! I'd like to know which is the intent android sends when it sends a message. And how can I listen for this intent in my application. I wanted that, when I send a message in native android messaging, my application listen this intent, so it will know a new message has been sent. So, which one is it, and how to listen for this intent? Thanks. 回答1: I believe the Intent is: public static final String SMS_RECEIVED_ACTION = "android.provider.Telephony.SMS_SENT"; This guy had an article about

Android ContentProvider openFile: need to serve “modified” file

偶尔善良 提交于 2020-02-27 12:27:22
问题 I want to serve image files that saved on "external storage" via ContentProvider . These image files are 'mangled' - first 50 bytes are XORed with some arbitary value. I want to do 'demangle' within ContentProvider so that other applications don't need to do special treatment. I'm using Mininum SDK version 14. Here is my first try - using piped ParcelFileDescriptor : public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException { // basic uri/mode check here return

How to create a new Playlist using ContentResolver

孤街浪徒 提交于 2020-02-26 17:32:12
问题 I'm attempting to create a new Playlist , using Android's ContentResolver , that will be added to music player's playlists, but when the code runs, the insert into the playlist returns null (for the Uri ) and when I check the music player's playlists, my new Playlist entry isn't there. I suspect that the reason that the insert() returns null is because I haven't created the Playlist correctly. Could someone clarify how to dynamically create a new playlist, given that my code doesn't work. (In

Android - wizard type activity with adapter backed data

有些话、适合烂在心里 提交于 2020-02-25 05:20:35
问题 Im trying to work out the best way to approach the following problem with Android. I have data coming from a content provider in the form of an array of Question objects. A Question object has some text and an id. Each question has 4 answers, which will be sent back to the rest server in a QuestionResponse object. Id like the questions to be displayed one at a time in a view (user reads question, selects answer, and then hits "next", which moves to the next question on a new screen) but I

Permission Denial with File Provider through intent

泪湿孤枕 提交于 2020-02-24 07:49:37
问题 I am attempting send a bitmap from the cache directory of my app to the text messaging app. I am using file provider to grant temporary permission to the application that handles the intent. When I try to send the intent and I select the default android text messaging app from the intent chooser my message app crashes and I get this error. I tried selecting other applications from the intent chooser such as email and other messaging apps and it seemed to work fine, only crashes with the