Android :: Orientation Specific Failure In ListView.layoutChildren - Exception ArrayIndexOutofBoundsException

Sep 20, 2010

I am a very green android developer and need some help with a strange program crash. Often the program will run just fine. There is an equal chance it will fail (see stack at the end). I can watch the program run through the getView function and everything seems in order (i.e. all the information is there as expected and passes through convertView seemingly fine). Either it will go through a few times and then program will be A-OK or it will fail as seen below and I have not been able to pick out what causes the crash. Even stranger is that if I hold the phone in landscape mode, it will never fail!! It only fails about 50% of the time in portrait orientation.

CODE:.................

-----------------------Failure----------------------------------------------

CODE:.........................

Android :: Orientation specific failure in ListView.layoutChildren - exception ArrayIndexOutofBoundsException


Android :: Can Force A Specific Layout Orientation - But Have An Opposite Keyboard Orientation Android

Aug 19, 2010

I understand how to force a specific orientation per activity in the android manifest. I would like to know if it is possible to allow the keyboard to change orientation even though the activity(the layout really) must remain unchanged.

View 1 Replies View Related

Android :: ItemizedOverlay ArrayIndexOutOfBoundsException

Jan 31, 2010

I've seen all the posts about using setLastFocusedIndex(-1).

I've tried that but my app is still crashing.

CODE:...............

View 2 Replies View Related

Android :: ListView In Activity Getting Refreshed On Changing Orientation

Apr 7, 2010

I have Activity with ListView inside it and in the onCreate method of the Activity I have code for populating the Data of the ListView this Data is a server based and so populating includes calling Network URLs. I have the ArrayAdapter of the ListView in the Same Activity Class.

Now the Issue I'am facing is that, in Rest all scenarios my Activity is behaving in a proper way but when the Orientation [ Portrait to Landscaped or other way round] is taking place the Data is Getting lost and Newer Data calls are Required to Populate the Same Old Data now this is something that is not intended out the code how should I deal with it.

View 4 Replies View Related

Android : Want To Reload Data In ListView When Change Orientation

Nov 17, 2010

I have a listview that Display some Categories on it from my server, it works fine but when i change Orientation it Reload it...

What Should i do to Avoid Reload ?

View 1 Replies View Related

Android :: Runtime Exception ListView Whose Id Attribute Is 'droid.R.id.list' / What's Wrong?

Jun 14, 2010

I am getting a run time exception
java.lang.RuntimeException: Your content must have a ListView whose id
attribute is 'android.R.id.list'

I don't know what is wrong> code...

View 1 Replies View Related

Android :: Change A Specific Row In A ArrayAdapter ListView Droid?

Jul 21, 2010

I am trying to change the color on a specific row depending on different states. This is the code i have at the moment. code...

The code kinda works..but it changes all the rows. Any ideas?

View 5 Replies View Related

Android :: Perserve The Data In Arrayadapter/listview When Change Orientation?

Feb 26, 2010

As above, is it done automatically? My list was empty once the orientation chMYanges? and nope, i need the orientation change.

My adapter

CODE:............

My onCreate

CODE:...................

View 3 Replies View Related

Android :: Expandable ListView / Add Items To A Specific Group At Run Time

Oct 5, 2010

I met a problem , i have a expandableListView has 5 groups, if i wanna add some items to the second group , and update the expandableListView at run time, could someone teach me how to do that?

View 1 Replies View Related

Android :: Android - NotifyDataSetChanged() Not Updating Listview After Orientation Change

Jun 21, 2010

On a click event I create a thread and start a long-running operation based on this method. After the long-running task is completed, it does a callback to another method, which does a post to the handler:

@Override
public void contentSearchModelChanged(Model_ContentSearch csm, ArrayList<Class_Reminder> newRemindersList) {
remindersList = newRemindersList;
mHandler.post(mUpdateDisplayRunnable);
}...........

This works beautifully when I do this normally. However, if I change the orientation while the long-running operation is running, it doesn't work. It does make the callback properly, and the remindersList does have items in it. But when it gets to this line:

r_adapter.notifyDataSetChanged();

Nothing happens. The odd thing is, if I do another submit and have it run the whole process again (without changing orientation), it actually updates the view twice, once for the previous submit and again for the next. So the view updates once with the results of the first submit, then again with the results of the second submit a second later. So the adapater DID get the data, it just isn't refreshing the view. I know this has something to do with the orientation change, but I can't for the life of me figure out why. can anyone suggest an alternative method of handling threads with orientation changes?

View 1 Replies View Related

Android :: Sqlite Exception:java.lang.Illegal Argument Exception Column Id Does Not Exist

Jul 14, 2010

I created a sql lite database with the following columns:
static final String dbName="demoDB";
static final String tableName="Employees";
static final String colID="EmployeeID";
public void onCreate(SQLiteDatabase db) {
// TODO Auto-generated method stub
db.execSQL("CREATE TABLE "+tableName+" ("+colID+" INTEGER PRIMARY KEY AUTOINCREMENT, "+
colName+" TEXT, "+colAge+" Integer);");
I want to select all the records in the database like this and display them in a gridview:SQLiteDatabase db=this.getWritableDatabase();Cursor cur= db.rawQuery("Select "+colName+", "+colAge+" from "+tableName, new String [] {});String [] from=new String []{DatabaseHelper.colName,DatabaseHelper.colAge};
int [] to=new int [] {R.id.colName,R.id.colAge};
SimpleCursorAdapter sca=new SimpleCursorAdapter(this,R.layout.gridrow,c,from,to);
GridView grid=(GridView)findViewById(R.id.grid);
grid.setAdapter(sca);but i receive the following exception:java.lang.IllegalArgumentException: column '_id' does not exist.the db table does not have a column with name '_id'so what is wrong with this code

View 3 Replies View Related

Android :: Orientation Change - Dialog Above Activity With Fixed Orientation

May 14, 2009

I have created an activity for my game which handles all orientation changes by itself and has a fixed "portrait" layout. Actually it uses the accelerometer and is rendered using 2D canvas methods. If the level has been completed I show up a highscore dialog in which the user can enter his name. The dialog is floating above the underlying level screen which gets blurred out nicely. This generally works.

Problem is that the dialog does not get rotated if the orientation of the phone changes. So even if the keyboard is exposed the dialog is shown in portrait mode instead of landscape. I have tried to use an activity with dialog theme instead but the behavior didn't change. After several tries it seems that I have found the reason for this: Once there's an activity with fixed orientation in the activity stack then all subsequent activities keep this orientation, too. They will not react on orientation changes anymore (e.g. if the keyboard gets exposed).

After upgrading to 1.5 SDK the described behavior changed a little bit. Now at subactivities indead react on orientation changes like expected. However, the need to have an opaque background! That means that neither dialogs nor activities with dialog theme will work. Those will stick with the orientation of the underlaying activity. So my workaround is to first start a sub-activity with an opaque black background. This activity then shows my highscore dialog on top. It looks quite okay but I wonder if there's a better solution? Is it possible to show a dialog above a fixed portrait or landscape activity which automatically adapts to orientation changes?

View 3 Replies View Related

HTC Incredible :: Change Email Notification To Specific Sound / Select A Specific Ring For Mms?

May 31, 2010

Just picked up my incredible, and I have two questions....

1. how do i change the email notification to a specific sound? As of rite now, when i receive an email nothing happens (no sound or vibrate).

2. How do I select a specific ring for mms. I know how to select sms, but I cant figure out how to change the mms.

View 3 Replies View Related

General :: Disable Specific App Permission For Specific Or All Apps

Mar 12, 2014

I have had androids for over two years now and am getting more and more concerned every time I download an app and seeing that it wants to READ my SMS message and Contacts.

Is there a way I can disable reading of SMS messages or any one of the other permissions by specific apps, or all apps?

Are we living in a world where any "joe schmo" can upload an app the to the app store and wait for those inadvertent downloads and collect all your personal information, and that's after all the time we spend protecting our identity and personal details?

View 2 Replies View Related

Android :: Using Orientation Sensor To Get 360° Orientation

Jul 17, 2009

I have a problem with working with the ORIENTATION values of the SensorManager. I would like to have some kind of 360°-value which directly shows me if the phone is in normal portrait (0°), landscape, portrait turned around (180°) or anything in between. So I could have, for example, an arrow that points to the floor (like gravity would do with a plummet) all the time, no matter how I tilt (sidewards) the phone. I thought this would be easy, but I'm pretty confused at the moment.

First of all, the X value of the orientation-array seems to correspondent with how I turn the phone, BUT: if it's completely uprightly standing, this value is about 60° ... why not 0° (or 90°, 180°, 270°), as I would expect?

Second: The value resets if I turn the phone and Android automatically changes screen orientation. So both in Portrait and in Landscape mode it will be sth. like 60° when the phone is in a 0° angel in real world. I set "android:screenOrientation" to "landscape" but this doesn't help anything :/

I want the app NOT to change orientation when I turn the phone, but I want it to get a continuous orientation value when I tilt the phone.

View 4 Replies View Related

Android : CTS Failure In View

May 3, 2010

Was playing with CTS ,and came across a failure like below

testAnimation fail junit.framework.AssertionFailedError: unexpected timeout at android.view.animation.cts.DelayedCheck.run DelayedCheck.java:51)

Can anyone pass me some light on , how to fix this issue? or what should be the approach in cases like this? Any information will be appreciated.

View 3 Replies View Related

Android TCP Receive Failure

Aug 24, 2012

I am connecting to a server on my network written in C#. The data sent from the android device is received by the server and a reply is succesfully sent but the android code timesout and never gets the return data.I have tested that the C# server can communicate and reply with a C# client.

I have studied the network traffic using Wireshark when using both the C# server-android client and C# server-C# client and it appears that the android device acknowledges(ACK) the reply data but my code never recieves it.

I have the code running in a thread so running it on Android 4.0 doesn't error out but I have tried running it on Android 2.2 with exactly the same behaviour(or lack of it). Also I have run it on 2 different android devices.

(AndroidManifest.xml)
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
(My Code)
[code]...

View 3 Replies View Related

Android :: MediaPlayer - Failure In Wav And 3gp Formate

Jul 8, 2009

I was very confused for MediaPlayer, follow the audio supporting formate from: http://developer.android.com/guide/appendix/media-formats.html

I success in mp3 formate, but failure in wav and 3gp formate.. i can't figure out why i can't? the other question is the error message from adb logcat,

E/MediaPlayer( 729): error (1, -1) E/MediaPlayer( 729): Error (1,-1)

What's the "(1,-1)" means? i try my best for several methods and audio/video support formate, but still failuere, and always get the error message..

View 6 Replies View Related

Android :: TC Failure Due To Unknown Host

Aug 12, 2010

I am running the CTS on the Arm based phone. When I tried to run the Network related test cases.I am getting the above error in the "android.core.tests.luni.net" test package and due to this error around 179 test cases are getting failed.Please help me out.Is there any environment setting issue in the setting up the target.I have connected the target with the USB to my Fedora system. additionally target have the 3G Sim connected with It.

View 2 Replies View Related

Android :: Apk Manual Install Failure [-12]

May 12, 2009

I have developed a small application on eclipse (SDK 1.5r1). When I run the project it worked fine. Then I exported the signed application. (Lunar.apk) Then I sent the Lunar.apk file to my friend to install on his machine. when he try to install it manually on the emulator the cmd prompt says

pkg: /data/local/tmp/Lunar.apk Failure [-12]

Please help me with this.

View 5 Replies View Related

Android :: Getting Failure While Trying To Install Layar401.apk

Nov 15, 2010

I have downloaded the Layar401.apk file from web and trying to install it into my android device [HTC Magic, OS 2.2]. But every time I'm trying to install it its saying -

adb install Layar401.apk
1098 KB/s (1855698 bytes in 1.649s)
pkg: /data/local/tmp/Layar401.apk
Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]

From other posts I figured out that there might be a missing shared library of google maps api in manifest.xml file. I tried to view the manifest.xml file and it gave me something like following -

package: name='com.layar' versionCode='27' versionName='4.0.1'
uses-permission:'android.permission.ACCESS_NETWORK_STATE'
uses-permission:'android.permission.INTERNET'
uses-permission:'android.permission.ACCESS_COARSE_LOCATION'
uses-permission:'android.permission.ACCESS_COARSE_UPDATES'
uses-permission:'android.permission.ACCESS_FINE_LOCATION'
uses-permission:'android.permission.ACCESS_WIFI_STATE'
uses-permission:'android.permission.CAMERA'
uses-permission:'android.permission.WAKE_LOCK'
uses-permission:'android.permission.READ_PHONE_STATE'
uses-permission:'android.permission.VIBRATE'
uses-permission:'android.permission.WRITE_EXTERNAL_STORAGE'
application: label='Layar' icon='res/drawable/icon.png'
uses-library:'com.google.android.maps'
launchable activity name='com.layar.Main'label='Layar' icon=''
sdkVersion:'3'
targetSdkVersion:'4'
uses-feature:'android.hardware.camera'
main
other-activities
other-receivers
supports-screens: 'small' 'normal' 'large'
locales: '--_--' 'ja' 'de' 'he' 'sk' 'el' 'nl' 'ko' 'fr' 'tr' 'es' 'it' 'pt' 'hu' 'ru' 'sv' 'fr_CA' 'zh_HK' 'zh_CN' 'pt_BR' 'es_US' 'zh_TW'
densities: '120' '160' '240'

But here it says library includes google maps api as well. So I'm not sure why I'm not able to install this apk file.

View 2 Replies View Related

Android :: Build Failure - Got Error

Jul 7, 2010

I followed instructions from here. After $ repo sync I tried to build it with $ make, but got this error:

CODE:............

Using Ubuntu 10.04 LTS.

UPD: I found a discussion, that claims, that problem could be that I'm having 64bit libs on my 32bit system.

CODE:.....

How do I figure out, if that libz.so.1.2.3.3 is the right lib, and in case I have to replace it with the right one, how do I do it?

View 3 Replies View Related

Android :: Failure On Loading Library ?

Sep 2, 2010

I have a similar problem to this question, but slightly different. I have compiled a .so library to use with JNI. Because it is large (15 MB), I am putting it on the SDCard instead of in the standard application place.

The file is called libSample.so and it's located at /data/library/libSample.so

I load it in a static initialization block:

CODE:.............

Here's the relevant logcat output:

CODE:............

I read the post about can android load dll's from sdcard in native mode which said that the sdcard cannot be used to load libraries, so I moved the .so into /data/data/com.example.hellojni/lib/libSample.so (the private app data storage location). No change:

CODE:.............................

What I don't understand is that clearly the library exists, and the OS is trying to load it ... so what would make it fail?

Following the advice of one of the commentors, I tried attaching via strace to get more detailed error information. The log can be found as a github gist.

The error appears to be on lines 47-51:

CODE:...........................

Here's the readelf of the library:

CODE:.........................

View 3 Replies View Related

Android :: SSL Failure Trying To Connect With GAE/Java

Sep 25, 2010

I am trying to connect an Android application with a secured HTTPS remote service that is hosted in Google App Engine for Java (https://applicationname.appspot.com), using the HTTPClient 4 implementation that comes with Android. The certificate is signed and valid form *.appspot.com.

I am using Android 2.1 in a real device (HTC Hero), and I get the following error: SSL23_GET_SERVER_HELLO:unknown protocol.

This is part of my code:

CODE:............................

This is the complete stack trace:

CODE:.........................

View 1 Replies View Related

Android : Attaching Database Gives Failure 14

Apr 4, 2009

Does the API restrict you from attaching to another database while you have one open?I tried the SQLite3 command "attach database .../contacts.db as aliasdb" .This works in the adb shell and I'm able to perform joins with tables in this database. When I use the same command via the API using "db.execSQL(attach database/contacts.db as aliasdb)" it gives me failure 14.Is this restricted on purpose or am I making a mistake somewhere?

View 5 Replies View Related

Android : Socket Creation Failure

Feb 3, 2010

I created a simple client socket from my Activity, but it fails. I am running this activity in emulator and server runs on PC(its a different application without Android stuff).

*clientSock = new Socket("127.0.0.1", 30001);*

logcat shows java.net.SocketException: permission denied <maybe missing INTERNET permission>

If I enable permission for my Activity(android.permission.INTERNET), my Activity constructor itself not called and logcat shows following info. Permission Denial: starting Intent < flg=0x10000000 cmp=com.example.client/.MyClientActivity > from null <pid=-1, uid=-1> requires android.permission.INTERNET.

Any suggestion on how to resolve this issue?

View 3 Replies View Related

Android :: Way To Change ListView Style Droid Without Building Custom Listview ?

Jun 26, 2010

I would like to change text and back ground color of my Listview without building custom rows. Is this possible ?

View 1 Replies View Related

Android :: Detecting Socket Connection Failure

Apr 1, 2010

I am working on an app that uses a Socket to connect to a controller over TCP. The protocol library was written in Java and I am implementing it in android via a Service. where the Connection class is a Thread that handles the communications with the controller. It's where the Socket lives.I'm using the Preferences mechanism to store the IP and Port. If I feed the Socket the correct IP and Port, the Connection Service works beautifully. However, I am trying to simulate a user entering the wrong information and having the connection fail. The ultimate goal is to present a dialog and offer the ability to "reconnect" or "update settings". However, when I enter a wrong Port number, the application simply hangs.I was under the impression that Threads executed concurrently so I've tried moving the call to start the Connection Service to a Thread, but it still hangs the application.

View 3 Replies View Related

Android :: Upload Failure On Reset Phone

Mar 3, 2009

I and my customer have had the same problem uploading new versions of my App. tried and failed: Load from website load from USB using adb install reset G1 to factory setting. After reset of phone the error message for ADB is Failure [INSTALL_FAILED_ALREADY_EXISTS].

View 4 Replies View Related

Android :: Failure To Connect Camera Service

Mar 11, 2010

I'm trying to write a basic camera app. The problem that I am facing is that it works fine in emulator but on the phone (Nexus one) it fails.

The point of failure is the very first call, i.e. Camera.open(). It fails on the phone saying "Failed to connect to camera service". Any idea what could be wrong? (BTW, I am calling this from my activity's onCreate funtion itself, could that be an issue?)

For the information, I do have the necessary Camera permissions specified in my manifest xml file.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved