This article describes the Android implementation call system album and photo Demo sample. Share to everyone for your reference, specific as follows:
Recently, I have seen several people in the group talk about the Internet, some of the Android call system photo albums and photo
Google goggle arrived on schedule and can be downloaded for free in the Android Market. The following is my experience.
I first took a photo of Pepsi on the table and did not identify the Big bottled Pepsi, but directly identified the Pepsi logo. This is understandable, after all, I only shot the logo part. It is worth noting that the logo on the bottle is curved and I am not sure.
Then I tried the
There are two ways to call a camera in the Android system. One way to directly call your phone is to use your own photo app. For example, Camera360 is a powerful mobile phone camera software that is available on every operating system, and can take photos of different styles and special effects, as well as cloud service and Internet sharing, with more than 250 million users worldwide. Now specialized in the
(mcursor.movetonext ()) {//print log to view the value of the photo id long id = mcursor.getlong (mcurso R.getcolumnindex (mediastore.images.media._id)); LOG.I ("mediastore.images.media_id=", ID + ""); Filter out unwanted images, just get pictures of photos stored in the photo album after the picture String path = mcursor.getstring (Mcursor.getcolumnindex (MEDIASTORE.IMAGE
In one of the previous articles, we introduced a simple camera opening function, as described in. Android Simple call camera function, to realize the open camera function, this time will be taken in front of the photo display into the ImageView, forming a complete effect to see the example Mainactivity.javaPackage Com.example.camera;import Java.io.file;import Android.app.activity;import android.content.inte
: deal with the 90 degree problem and show: Private void setimage(Uri mimagecaptureuri) {//whether it's a photo shoot or a picture, each picture has a orientation value stored in the data that corresponds to the rotation angle.//so we are taking out the image is to take the angle value out so that the picture can be displayed correctly, no rotation effect to watchcontentresolver CR= This. Getcontentresolver (); Cursor Cursor= Cr.query (Mimagecaptur
Original: Android Camera2 photo (iii)--toggle camera, time lapse and flash mode
First, switch the cameraTo switch between the front and rear cameras, you first need to close the previously opened camera, turn off preview, then reopen the new camera and reopen preview.public void Switchcamera () { if (mcameraid.equals (Camera_front)) { mcameraid = camera_back; Closecamera ();
The example of this article for everyone to share the Android imitation micro-letter said, mood functions for your reference, the specific contents are as follows
Not only can realize the photo, select the gallery, the case of multiple patterns upload, the current many apps have similar functions of micro-letter friends, can be published to say such as the accompanying picture upload. The following is the
Recently in the development of the letter, found capture="Camera" >, Android can display cameras and documents, but iOS only has the camera option, and finally, by judging the device type, both iOS and Android can display the photo and gallery selection, The code is as follows:var u = navigator.useragent, app = Navigator.appversion;var isandroid = u.indexof ('
This article mainly introduces the android to achieve photo, video, recording code data, here sorted out the detailed code, the need for small partners can refer to.
Recordactivity.java
Package com.cons.dcg.collect;
Import Java.io.File;
Import Java.text.SimpleDateFormat;
Import java.util.*;
Import android.app.*;
Import android.content.Intent;
Import Android.database.Cursor;
Import Android.net.Uri;
Imp
This article will show you how to take a screenshot of the photo.
First look at the effect chart:
The screenshot is a little bit special, but now the Android smartphone's camera is millions of pixels and the pictures are very large. Therefore, we can not use the bitmap as the photo album screenshot, regardless of the large map of the map are unified use of th
In the past two days, after programming the android camera module and setting various parameters, we found that during previewing, the photos were reversed, rather than up or down, but 90 °. My mobile phone is Huawei u9200 and I used android4.0.3. Later I saw fuse (90), and then the preview was normal. However, the photos are still skewed when they are opened on the computer. Tilted 90 °, and then added this sentence: myparameters. Set ("rotation ",90
""true"); //Aspectx aspecty is the ratio of width to height, where the square is set (aspect ratio is 1:1)Intent.putextra ("Aspectx", 1); Intent.putextra ("Aspecty", 1); //Outputx outputy is a cropped image with a wide height of Intent.putextra ("OUTPUTX"); Intent.putextra ("outputy"); Intent.putextra ("Return-data"true); cut_ok);}4. Display and save pictures/** * Save the picture data after cropping to set the picture to ImageView * picdata */Setpictoview (Intent picdata) {c
Request permission
uses-feature android:name="android.hardware.camera" android:required="true" />
Check if the camera can be used
hasSystemFeature(PackageManager.FEATURE_CAMERA).
Get photos
staticfinalint1;privatevoiddispatchTakePictureIntent() { new Intent(MediaStore.ACTION_IMAGE_CAPTURE); ifnull) { startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE); }}
Get photo
Start writing Android's Photo browser today
The first thing to solve is to get sdcard below all the files that are pictures of the directory
So I wrote a generic Java class to get the suffix is. jpg,.bmp.png.jpeg file
Package com.jiangqq.utlis;
Import Java.io.File;
Import java.util.ArrayList;
Public class FileUtils
{
Private static ArrayList filelist = new ArrayList ();
Public static void
Android-image-filter19 photo filters, easy to use, all filters in file Bitmapfilter.java:Bitmap Newbitmap = Bitmapfilter.changestyle (Originbitmap, Bitmapfilter.blur_style); Imageview.setimagebitmap ( NEWBITMAP); Fresco-processorsA picture processor for Fresco that offers a variety of transformations.Android Camera Live Filter Series(Android Camera Live filter)
In jb2, take a photo/video in camera, and click the thumbnail in the lower right corner/slide to the left to view the image/video, after you click "delete" menu to delete all images/videos, the camera preview is displayed only at about 1/4 on the left of the screen. After sliding to the right, the camera preview interface is displayed. How to automatically return to the cemera preview interface after deleting all content from the "delete" menu
The
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.