1

I am trying to find a camera sample for android because I would love to mess with it and see what I can do. I am using the sample code from "Import an android code sample" and using Camera2. I somewhat get how it works however I would want to try it on my phone which is android 4.4 and 5.0 is the only required version. the minimum sdk is 5.0 and if changed error is. `Error:Execution failed for task ':Application:processDebugTestManifest'.

com.android.manifmerger.ManifestMerger2$MergeFailureException: org.xml.sax.SAXParseException; lineNumber: 20; columnNumber: 10; The processing instruction target matching "[xX][mM][lL]" is not allowed.`

the error is this and it says "Declarations must proceed all document content" It also says cannot resolve symbol for camera2basic

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->


<instrumentation
        android:name="android.test.InstrumentationTestRunner"
        android:targetPackage="com.example.android.camera2basic"
        android:label="Tests for com.example.android.camera2basic" />

So my question is Is there a way to make it accessible to more than just lollop? Or is there another sample code that is out there that I can use to play with and mess around with

Adrian Cid Almaguer
  • 7,815
  • 13
  • 41
  • 63
Ryan
  • 433
  • 3
  • 8
  • 14
  • If it helps any more. All I would like to do is have a screen display what the camera sees. there will be no picture taking. – Ryan Feb 19 '15 at 08:21

1 Answers1

3

The camera2 API does not exist prior to Android 5.0, so you cannot use it on a device running Android 4.4.

You can follow the API guide for the older camera API here instead: http://developer.android.com/guide/topics/media/camera.html#custom-camera

Eddy Talvala
  • 17,243
  • 2
  • 42
  • 47