{"id":6456,"date":"2014-04-18T05:39:04","date_gmt":"2014-04-18T05:39:04","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/18\/androidcamerarelated-issues-collection-of-common-programming-errors\/"},"modified":"2014-04-18T05:39:04","modified_gmt":"2014-04-18T05:39:04","slug":"androidcamerarelated-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/18\/androidcamerarelated-issues-collection-of-common-programming-errors\/","title":{"rendered":"android,cameraRelated issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/l6eI4.jpg?s=32&amp;g=1\" \/><br \/>\nDavid Dimalanta<br \/>\nandroid libgdx memory-efficiency debugging screen<br \/>\nWhen making my simple app for revisions to update the latest changes, I test it first between the device (Google Nexus 7) and desktop using Eclipse IDE. I made eleven screens for the game in terms of the following for testing:Splash screen (usually the company&#8217;s logo) Game content (Usually announced if it&#8217;s rated E or M, for example) Loading Screen Title screen Main Menu screen Player 1&#8217;s registration screen Player 2&#8217;s registration screen Player list screen Game screenI tried testing switching s<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/bqM1o.png?s=32&amp;g=1\" \/><br \/>\nJonathan Hobbs<br \/>\njava android animation sprites pixel<br \/>\nI have been coding speed for an object. I have made it so the object will move from one end of the screen to another at a speed depending on the screen size, at the monemt I have made it so it will take one second to pass the screen. So i have worked out the speed in code but when I go to assign the speed it tells me to force close and i do not understand why. Here is the code: MainGame Code:@Override protected void onDraw(Canvas canvas) {setBlockSpeed(getWidth()); }private int blockSpeed;privat<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/439473aa17e2133cf6675884ec512101?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmilano<br \/>\nandroid libgdx<br \/>\nI try to create live wallpaper with libgdx framework. Here&#8217;s my source code: repositoryWhen I run this, black screen with name of the app appears (probably empty android layout). Main game is not called. I think that it is because starting a service not an activity. However how could I start an activity when AndroidTestWallpaper isn&#8217;t subclass of Activity class? I used this tutorial but I don&#8217;t think it&#8217;s complete, in this form my IDE (Intellij IDEA) doesn&#8217;t let me to run the app because no main<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/tjQiZ.png?s=32&amp;g=1\" \/><br \/>\nA M<br \/>\nandroid cocos2d<br \/>\nCCScene doesn&#8217;t show anything on 4.3 version?I am working on a project in which I&#8217;m using the cocos2d_android.jar and on the 4.3 version the screen goes blank and music\/ccTouches\/others things working fine.Even after I change the jar file with the API level 18(4.3 version), Add into my project and there is no error in the import time and uses their classes but in the RunTimeError occurred like :09-14 07:49:49.890: E\/AndroidRuntime(1282): FATAL EXCEPTION: GLThread 102 09-14 07:49:49.890: E\/Andro<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/28PGo.png?s=128&amp;g=1?s=32&amp;g=1\" \/><br \/>\ngrgarside<br \/>\nandroid mac-os irrlicht ndk<br \/>\nI&#8217;m new to irrlicht and I have started with irrlicht android port. I have made the following changes to android.mk file:LOCAL_CFLAGS := -O3 -DANDROID_NDK -DDISABLE_IMPORTGL -I.\/..\/include\/ -I.\/include\/ -I\/documents\/karthik\/android\/android-ndk-r9\/platforms\/android-18\/arch-arm\/usr\/includeLOCAL_LDLIBS := -L\/documents\/karthik\/android\/android-ndk-r9\/platforms\/android-14\/arch-arm\/usr\/lib\/libGLESv1_CM.so -ldl -llog -L\/documents\/karthik\/android\/android-ndk-r9\/platforms\/android-14\/arch-arm\/usr\/lib\/libGLE<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/4bb1054fcf125272d67a31bbb80a6983?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nrolfl<br \/>\njava android parcelable<br \/>\nI am new to the Parcelable interface that I have implemented in my classes. At first they were Serializable, but now I have changed them to Parcelable.Have I done this the right way, and am I doing everything correctly? Here are my snippets of code:Citypublic class City implements Parcelable {private String code;private String name;private List&lt;CityWeather&gt; weathers ;public City() {super();}public String getName() {return name;}public void setName(String name) {this.name = name;}public Str<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/98bc78e819c2b91a422f2c51e2d930c2?s=32&amp;d=identicon&amp;r=PG&amp;f=1\" \/><br \/>\nMark101<br \/>\njava android<br \/>\nI have a method called hash button however on press the application crashes. Any idea why this is happening?I have included parts of my logcat below, any help is greatly appreciated.Many Thanks, Mark02-12 16:59:26.115: E\/AndroidRuntime(2416): FATAL EXCEPTION: main 02-12 16:59:26.115: E\/AndroidRuntime(2416): java.lang.ArrayIndexOutOfBoundsException: length=4; index=4<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7d48d30b2825ea9e33a369adf8d33752?s=32&amp;d=identicon&amp;r=PG&amp;f=1\" \/><br \/>\nuser3313192<br \/>\njava android json android-asynctask<br \/>\nI&#8217;am building a app that connects to a remote sever through JSON in this case connecting to &#8216;localhost&#8217;. The current program i have written will open different UI depending on their &#8216;type&#8217; i.e normal or admin. My logat and java are below: This is my Log cat data: 02-19 07:19:51.921: E\/AndroidRuntime(1707): FATAL EXCEPTION: AsyncTask #1 02-19 07:19:51.921: E\/AndroidRuntime(1707): Process: com.example.newjudoapp, PID: 1707 02-19 07:19:51.921: E\/AndroidRuntime(1707): java.lang.RuntimeException: A<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/56514e0c53b19a3b25ecf51dce68094c?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser2005938<br \/>\njava android box2d andengine sigsegv<br \/>\nI am getting this error:Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 16513 (UpdateThread)when I create the body of a wall, but only the second time the method is called. For example, when the scene loads, the method that loads these walls is called once, and when the player collides with an object that brings him to the next room, the method is called again. This is the part of the method that is giving this error:Tile t = new Tile((float) i * 64, (float) j * 64- ((j * 64 &#8211; (mHeight<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/380c01c72f87343c3f050f9966aad95b?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nbaTim\u00e1<br \/>\nandroid android-intent android-activity android-logcat<br \/>\nWhen i try to open a activity in my app which its suposed to show some saved messages(that i saved in another activity in the same app) it Force to Close and shows me these errors in LogCat:10-08 18:22:17.243: E\/AndroidRuntime(269): FATAL EXCEPTION: main10-08 18:22:17.243: E\/AndroidRuntime(269): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mensagem\/com.example.mensagem.Mensagenssalvas}: java.lang.NullPointerException10-08 18:22:17.243: E\/AndroidRuntime(269):<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e207e4d822cccc024f5b568246fe7218?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ngian paolo<br \/>\nkernel-modules camera firewire<br \/>\nI have a JVC GR-D740E camera with a usb firewire &#8220;Pinnacle 510 USB Rev: 2.0&#8243; (that works on windows xp). I&#8217;ve ubuntu 11.10 in dual boot with windows xp. I&#8217;ve done some steps with no success:i&#8217;ve installed kino. I opened Kino having the camera opened and in play. When i push the capture button kino returns that the kernel module raw1394 hasn&#8217;l loaded.I&#8217;ve tried with kdenlive that stopped with an error:Fatal Error.&#8221; &#8220;MLT&#8217;s SDL module not foundIf i do:gp@gp-desktop:~$ dvgrabError: no camera exists<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/JSvt5.gif?s=32&amp;g=1\" \/><br \/>\nakubabas<br \/>\nandroid camera<br \/>\ni want to start camera with name from database and i have three database.. i have code like this:public void startCamera() {long tim=System.currentTimeMillis();SimpleDateFormat df = new SimpleDateFormat(&#8220;yyyy-MM-dd kk:mm:ss&#8221;);String curTime =df.format(tim);System.out.println(&#8220;Time : &#8221; + curTime);Cursor c = helper.getKomp(almagId2);Cursor ca = helper.getSat(almagId);Cursor cb = helper.getUlok(almagId1);if(c.moveToFirst()){fileName =c.getString(1)+&#8221;_&#8221;+&#8221;kanan&#8221;+&#8221;_&#8221;+System.currentTimeMillis()+ &#8220;.jpg<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/fc763c6ff6c160ddad05741e87e517b6?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nBill the Lizard<br \/>\nandroid camera<br \/>\nMy custom camera apps crash if called by another application.Like for example, my camera was called by my tracks. If you press the camera icon of my tracks, it will popup and let the user select what camera want to use. I have tried to use my camera but it crashes. But if I click the camera from the application menu, my camera works fine.AndroidManifest.xml&lt;uses-permission android:name=&#8221;android.permission.CAMERA&#8221; \/&gt; &lt;uses-permission android:name=&#8221;android.permission.WRITE_EXTERNAL_STORAG<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/graph.facebook.com\/100000203991196\/picture?type=large\" \/><br \/>\nNishant Mendiratta<br \/>\nandroid camera android-camera frame-rate android-mediarecorder<br \/>\nFollowing is the full code for recording the videos from both the camera front and the back camera . I need to set the frame rate of the video recoded to 30 fps. That&#8217;s the big issue i have tried lots of thing but nothing is working out for me . It&#8217;s being around 2 week and i am stuck in this problem this is really urgent . I am running this application on Samsung Tablet GT-P1000 and the Firmware Version is 2.3.3 GingerBread Well the code is working perfectly fine it&#8217;s recording the videos .Majo<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/y8Etw.jpg?s=32&amp;g=1\" \/><br \/>\nkarthi<br \/>\nandroid web-services opencv camera<br \/>\nI am working on an android application. In which I am getting users photo images(5 images)(Using opencv2.4.2 camera with face detection) and save into my database in the server using web service. For this I am using Opencv2.4.2 face detection sample, Ksoap2 for web service. In my android emulator and device(android 4.0.4) application working fine. But When I check with another device(android 4.0.3) it throws &#8220;Unfortunately, Myapp has stopped&#8221;. I have attached my log file below. I don&#8217;t know what<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/56d3ad2d6f054a03a54b68dc8152866f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nHesam<br \/>\nandroid video camera record<br \/>\nIn my application I need to have live streaming (music), buffer it and when it is finished, play it and capture video (video together with music which is playing, something like Karaoke). the problem is When I run the application, Log cat shows me following messages. what is the reason of application lost the surface?05-05 15:43:48.929: D\/MediaRecorder(4745): doCleanUp 05-05 15:43:49.519: E\/MediaRecorderJNI(4745): Application lost the surface 05-05 15:43:49.542: D\/***VideoRecording***(4745): IOE<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/Xngzc.png?s=32&amp;g=1\" \/><br \/>\nFllo<br \/>\njava android camera light flashlight<br \/>\nSo i designed a app for a basic flashlight it works fine BUT it&#8217;s slow ineffective and crashes the second you tap the on and off button to fast. what can i do to improve it?here is what i have so far :package com.example.myfirstapp;import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.view.View; import android.widget.ToggleButton; import android.graphics.SurfaceTexture; import android.hardware.Camera.Parameters; import android.hardware.Camera;public clas<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e4d234a6adde77aa82607033e8679022?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRaghunandan<br \/>\nandroid camera nullpointerexception android-sdcard<br \/>\nI have a custom camera in my application with which I capture a picture, and save it in SD card within a folder. I am able to capture the image,but I need to get the image in another activity. I get Failure delivering result and NullPointer Exception in the onActivityResult event. I know that the image is being saved as I can see the path of the image, but the image itself is displayed in the folder after some random period of time. I am not sure if this can be the reason for NullPointerExceptio<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e2bec54a5c0b79196d5a74bf852935ca?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nOmar Mihilmy<br \/>\njava android eclipse camera<br \/>\nI am trying to build my own custom camera application I have learn through the Android developers Group about how to code the whole application but as soon as I launch the camera it crashes I don&#8217;t know what is the problem here is my code:package com.example.tapeit;import java.io.*; import java.text.SimpleDateFormat; import java.util.Date;import android.app.Activity; import android.content.Context; import android.content.pm.PackageManager; import android.hardware.Camera; import android.hardware.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/19b0561845be823943b559cf79eeca23?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nKrivers<br \/>\nandroid opencv camera surfaceview nativelibrary<br \/>\nI&#8217;m using OpenCV for my application (third tutorial &#8211; camera control &#8211; from OpenCV samples). private int frameRate = 0;public Mat onCameraFrame(CvCameraViewFrame inputFrame) {mGray = inputFrame.gray();if (frameRate == 20){String rec = NativeLib.recognize(0,mGray.getNativeObjAddr(),mNetworkPath);\/\/Core.putText(mGray, rec, new Point(50,50), Core.FONT_HERSHEY_SIMPLEX, 1.0, sc,2);frameRate = 0;}++frameRate;return mGray; }Problem is that after some time, the application stops working. This is the co<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>David Dimalanta android libgdx memory-efficiency debugging screen When making my simple app for revisions to update the latest changes, I test it first between the device (Google Nexus 7) and desktop using Eclipse IDE. I made eleven screens for the game in terms of the following for testing:Splash screen (usually the company&#8217;s logo) Game content [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6456","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6456"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6456\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}