mediastore

Alibabacloud.com offers a wide variety of articles about mediastore, easily find your mediastore information here online.

Andrews called three-step system camera

The first step: uses-permissionandroid:name=" Android.permission.WRITE_EXTERNAL_STORAGE "/> uses-permission android:name="Android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/ >Step Two:Intent Intent = new Intent (Mediastore. Action_image_capture);Startactivityforresult (Intent, 1);Step Three:protected void Onactivityresult (int requestcode, int resultcode, Intent data) {TODO auto-generated Method StubSuper.onactivityresult (Requestcode, ResultCode, data)

Android intent usage Summary

, "the email subject text ");4. It. putextra (intent. extra_stream, "file: // sdcard/mysong.mp3 ");5. sendintent. settype ("audio/MP3 ");6. startactivity (intent. createchooser (IT, "Choose email client ")); Play multimediaUri uri = URI. parse ("file: // sdcard/song.mp3 ");Intent it = new intent (intent. action_view, Uri );It. settype ("audio/MP3 ");Startactivity (it ); Uri uri = URI. withappendedpath (mediastore. Audio. Media. internal_content_uri

The [Android algorithm] is used to obtain the video Thumbnail (thumbnailutils) and play the video.

Package com. Test. activity; Import java. Text. decimalformat; Import java. Text. numberformat; Import java. util. List; Import Android. App. activity; Import Android. App. alertdialog; Import Android. content. context; Import Android. content. dialoginterface; Import Android. content. intent; Import Android. Graphics. Bitmap; Import Android. Graphics. drawable. bitmapdrawable; Import Android. Graphics. drawable. drawable; Import android.net. Uri; Import An

"Turn" Pro Android Learning Note (v): Learn about content Provider (top)

Content provider is an abstract data encapsulation and data access mechanism, such as SQLite is a data source with an Android device that can be encapsulated into a content provider. To read and write through the content provider, you need to use a URI. Recommended Read Android Learning Note (47): Content provider and Android contact information, Android learning Note (48): Provide your own content Provider and Android Learning notes (49): Access data via content provider. Content provider's imp

Use Meidastore.audio to get audio files from your phone

Mediastore is the Android system comes with the multimedia system database, he is refreshed at each boot, you can use the cursor this class to access and modify the database, modified after the need for broadcast forced refresh.Use the cursor to obtain an object instance of Contentresolver through the context.Cursor Cursor1 = Context.getcontentresolver (). Query (MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,null, null,null,null);View CodeThe context in

The way to explore Android camera-Start

protectedvoidonActivityResult(intint resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); }In the Onactivityresult method, the data parameter is used to obtain the image:/** * 通过data取得图片 */Bundle extras = data.getExtras();Bitmap bitmap = (Bitmap) extras.get("data");mImageViewShow.setImageBitmap(bitmap);However, now the cell phone pixel so high, if the picture is particularly large, will the data too large and FC it? Rest assured, Android has long been t

Why cannot I display images saved to an album on Android?

Today, I have been struggling for a long time. I use the Android api:[Java]Bitmap bitmap = imageMap. get (url );MediaStore. Images. Media. insertImage (getContentResolver (), bitmap, "myPhoto ","");Save the bitmap to the system album. The saved image cannot be found until the album is opened. However, after restarting the phone, you can find it in the album. After the study, we found that you need to refresh the album environment to the album after wr

Android Multimedia-mediarecorder recording audio and video

(IOException e) {//Todo Auto-gene Rated catch Blocke.printstacktrace ();} Recorder.start (); Stateview.settext ("recording"); btnstart.setenabled (false); btnplay.setenabled (false); Btnstop.setenabled (true); Break;case r.id.btn_stop:recorder.stop (); Recorder.release ();// We can then store our recording files in Mediastore contentvalues values = new Contentvalues (); Values.put (MediaStore.Audio.Media.TITLE, " This is my first Record-audio "); Val

Android advanced 3: Bitmap)

1. click the button, specify the action and uri, and set the result code (ResultCode) to reach the Gallery of the default album on the mobile phone. The Code is as follows:1. public void onClick (View v ){2. // TODO Auto-generated method stub3. Intent intent = new Intent (Intent. ACTION_PICK,4. android. provider. MediaStore. Images. Media. EXTERNAL_CONTENT_URI); // start the Photo Gallery5. startActivityForResult (intent, 0 );6 .}2. Select an image a

Android draw Step 4: Draw and rotate text on the in-place Graph

1. click the button, specify the action and uri, and set the result code (ResultCode) to reach the Gallery of the default album on the mobile phone. The Code is as follows:1. public void onClick (View v ){2. // TODO Auto-generated method stub3. Intent intent = new Intent (Intent. ACTION_PICK,4. android. provider. MediaStore. Images. Media. EXTERNAL_CONTENT_URI); // start the Photo Gallery5. startActivityForResult (intent, 0 );6 .}2. Select an image a

Android Intent usage Summary

);String [] tos = {"me@abc.com "};String [] ccs = {"you@abc.com "};It. putExtra (Intent. EXTRA_EMAIL, tos );It. putExtra (Intent. EXTRA_CC, ccs );It. putExtra (Intent. EXTRA_TEXT, "The email body text ");It. putExtra (Intent. EXTRA_SUBJECT, "The email subject text ");It. setType ("message/rfc822 ");StartActivity (Intent. createChooser (it, "Choose Email Client "));// Transfer the attachmentIntentit = new Intent (Intent. ACTION_SEND );It. putExtra (Intent. EXTRA_SUBJECT, "The email subject text

About custom Dialog, about dialog

_my_camera_from_album = (TextView) findViewById (R. id. TV _my_camera_from_album); TV _my_camera_take_photo.setOnClickListener (new android. view. view. onClickListener () {@ Overridepublic void onClick (View v) {MyCameraDialog. this. dismiss (); // select Intent intent = new Intent ("android. media. action. IMAGE_CAPTURE "); (Activity) mContext ). startActivityForResult (intent, 0) ;}}); TV _my_camera_from_album.setOnClickListener (new android. view. view. onClickListener () {@ Overridepublic

Android --- send content to another application

, Uri. fromFile () is used to create A file: // style Uri object for the shared Intent object. C. images, videos, and audios can be scanned and added to a multimedia file in the system media store. You can use scanFile () to check whether the file exists. onScanCompleted () the callback method returns a Uri object used to share the content: // style contained in the Intent object. D. the insertImage () method can be used to insert an image to the MediaStore

Summary of Android Intent usage

); Uri uri = Uri. parse ("file: // sdcard/song.mp3 "); It. setDataAndType (uri, "audio/mp3 "); StartActivity (it ); Uri uri = Uri. withAppendedPath (MediaStore. Audio. Media. INTERNAL_CONTENT_URI, "1 "); Intent it = new Intent (Intent. ACTION_VIEW, uri ); StartActivity (

Android Development Art-chapter II IPC mechanisms

Mediastore functionality is the file type ContentProvider. The underlying data of ContentProvider looks like a sqlite database, but ContentProvider does not have any requirements for the underlying data storage, you can use the SQLite database, or you can use normal files. You can even use an object in memory to store data. To observe the data changes in a contentprovider, you can register the observer through the Contentresolver Registercontentobser

My Android Development related articles

): Touch screen (2): Velocitytracker 2014.10.30 Pro Android Learning Note (142): Touch screen (1): Motionevent 2014.10.30 Pro Android Learning Note (141): List Widgets (3): Remote views service and Factory 2014.10.23 Pro Android Learning Note (140): List Widgets (2): App Widget Provider 2014.10.23 Pro Android Learning Note (139): List Widgets (1): Overview 2014.10.16 Pro Android Learning Note (138): Home screen Widgets (4): App Widget Provider 2014.10.15 Pro Android Learning Note (13

Use SurfaceView to preview and save the photo to the album

MainActivity: [java] package c. c; import java. io. IOException; import java. util. iterator; import java. util. list; import android. app. activity; import android. content. contentResolver; import android. content. pm. activityInfo; import android. graphics. bitmap; import android. graphics. bitmapFactory; import android. graphics. pixelFormat; import android. hardware. camera; import android. OS. bundle; import android. provider. mediaStore; import

Android jigsaw puzzle game development full record 4

. bitmapFactory; import android. graphics. color; import android. graphics. drawable. colorDra Wable; import android. graphics. drawable. drawable; import android.net. uri; import android. OS. bundle; import android. OS. environment; import android. provider. mediaStore; import android. view. gravity; import android. view. layoutInflater; import android. view. view; import android. view. view. onClickListener; import android. widget. adapterView; impo

Android built-in applications

"}; String [] ccs = {"you@abc.com"}; it. putExtra (Intent. EXTRA_EMAIL, tos); it. putExtra (Intent. EXTRA_CC, ccs); it. putExtra (Intent. EXTRA_TEXT, "The email body text"); it. putExtra (Intent. EXTRA_SUBJECT, "The email subject text"); it. setTy Pe ("message/rfc822"); startActivity (Intent. createChooser (it, "Choose Email Client"); Intent it = new Intent (Intent. ACTION_SEND); it. putExtra (Intent. EXTRA_SUBJECT, "The email subject text"); it. putExtra (Intent. EXTRA_STREAM, "file: // sdcard/

Implementation of mobile phone photo function in Android Development (source code sharing)

. OS. bundle; import android. app. activity; import android. content. intent; import android. graphics. bitmap; import android. view. view; import android. widget. button; import android. widget. imageView; public class MainActivity extends Activity {private ImageView imageView; private Button button; private final int CAMREA_RESQUSET = 1; @ Overrideprotected void onCreate (Bundle savedInstanceState) {super. onCreate (savedInstanceState); setContentView (R. layout. activity_main); imageView = (I

Related Keywords:
Total Pages: 15 1 .... 11 12 13 14 15 Go to: Go

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.