Android :: Viewflipper Receiver Not Registered Error While Orientation Change In 2.1 And 2.2

Sep 19, 2010

I am using viewflipper for fling gesture recognition everything works fine for 2.0 and prior but in 2.2 and 2.1 it throws exception as "java.lang.IllegalArgumentException: Receiver not registered: android.widget.ViewFlipper" below is full debug trace.

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

There is issue on Google related to this bug 6191.

And the solutions mentioned in there seems to work only if your are creating ViewFlipper through code but in my case i am using ViewFlipper in XML which is my layout file and so i cant use the solution mentioned for extending the ViewFlipper i tried using delay nothing seems to work.

Below is my layout code.

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

Android :: Viewflipper Receiver not registered error while orientation change in 2.1 and 2.2


Android :: ViewFlipper Dies With Receiver Not Registered

Nov 12, 2010

We have a very simple ViewFlipper widget in a layout. The following trace back happens when it crashes. This does not trace back into our application code at all.

There is a similar bug logged for 2.1 http://code.google.com/p/android/issues/detail?id=6191

We are running on 2.2 and getting this error.

Is this fixed or is it necessary to create a workaround subclass?

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

View 6 Replies View Related

Android :: Java.lang.IllegalArgumentException - Receiver Not Registered - Widget - ViewFlipper

Jan 3, 2010

I have a ViewFlipper in my app.

When my app is running and the phone goes to sleep it works fine.

When I wake the phone up and my app then tries to display again, I get the following error.

I can't figure this out.

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

View 2 Replies View Related

Android :: ViewFlipper Switching Views On Screen Orientation Change

Jan 24, 2010

I have a 3 nested ViewFlippers which seem to be working ok except that when I change the screen orientation the view flip back to the first one of my views, giving the user the impression it went back a few steps.I am a bit stumped as to what to do and was hoping someone had some experience with this.

View 3 Replies View Related

Android :: How To Check If Receiver Is Registered?

Apr 21, 2010

I need to check if my registered receiver is still registered if not how do i check it any methods?

View 2 Replies View Related

Android :: Detect If Broadcast Receiver Is Registered?

Mar 11, 2010

I'm using more than 1 instance of MapActivity in an application that look different from each other. I'm running into an issue sometimes when leaving a MapActivity doesn't unregister it's BroadcastReceiver and going Back to resume the MapActivity page it tries to re-register the receiver again, thus receiving an Exception that Receiver already registered.

Anyone know of a way to tell if a Broadcastreceiver is registered and is listening?

View 2 Replies View Related

Android :: To Unregister A Broadcast Receiver Register Registered In Manifest File

Mar 19, 2010

I have been able to register and unregister a broadcast receiver from the java code and know that a broadcast receiver is unregistered (even if it is not done explicitly) on its own as the process that registered it is killed. Now I have a broadcast receiver which has been registered through manifest file and not through the java code, and need to unregister the broadcast receiver from the java code. Since this, i think would need a reference to System context that instantiates the broadcast receiver.

View 4 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

Android :: Change Intent Bundle Data Before Activity Recreated After Orientation Change

Jul 30, 2009

I have a notification that starts my activity and passes a messages using the intent's putExtra() function. The message is then displayed to the user in the activity's onCreate function. When the application is restarted due to a orientation change, the message is shown again as it is still in the intent's bundled data.
How can I remove the extra data?

I tried the following:

Bundle bundle = getIntent().getExtras();
if (bundle.getBoolean("showMessage")) {
// ... show message that is in bundle.getString("message")
// remove message
bundle.remove("showMessage");
}

But the message will still be shown after the orientation changed, seems like the intent used is not the one I changed, but the original one. The only workaround I found is to save the showMessage additionally in onSaveInstanceState(). Is there another way? Or is this the way to go?

View 2 Replies View Related

Android :: Broadcast Receiver Error

Jul 23, 2010

I am working on one project where i am using broadcast receiver in one of my activity to capture the incomming call and its works fine. when one of my other activity is open and that time if call is come then my broadcast receiver is fail to respond. can any one help me for this ? or its nessesorry to declare broadcast receiver in all my activity to do some comman task.

View 5 Replies View Related

Android :: Change Widget Dimensions On Orientation Change

Jul 22, 2010

I have a widget which has say, a dimension of 294*72(portrait). But when the orientation is changed, I need to change this dimension of the widget to another dimension which would look good on the landscape orientation.

View 4 Replies View Related

Android :: Error In Receiving SMS Using Broadcast Receiver

Oct 11, 2010

I'm trying to receive SMS using broadcast receiver. MySMSReceiver :

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.telephony.SmsMessage;
import android.util.Log;

public class MySmsReceiver extends BroadcastReceiver {
/** Tag string for our debug logs */
private static final String TAG = "MySmsReceiver";
@Override
public void onReceive(Context context, Intent intent) {
Log.i(TAG, "Recieved a message");
Bundle extras = intent.getExtras();
if (extras == null)
return;
Object[] pdus = (Object[]) extras.get("pdus");
for (int i = 0; i < pdus.length; i++) {
SmsMessage message = SmsMessage.createFromPdu((byte[]) pdus[i]);
String fromAddress = message.getOriginatingAddress();
String fromDisplayName = fromAddress;

Log.i(TAG, fromAddress);
Log.i(TAG, fromDisplayName);
Log.i(TAG, message.getMessageBody().toString());
break; } } }

and added in Mainfest file
<receiver android:name=".MySmsReceiver" android:enabled="false">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
<uses-permission android:name="android.permission.RECEIVE_SMS" />

But when I run this application and send a SMS using emulator it shows following logs in logcat

10-12 00:14:53.082: VERBOSE/Telephony(1032): getOrCreateThreadId uri: content://mms-sms/threadID?recipient=9898989898
10-12 00:14:53.203: VERBOSE/Telephony(1032): getOrCreateThreadId cursor cnt: 1
10-12 00:14:53.432: DEBUG/Mms:app(1032): getSmsNewMessageNotificationInfo: count=4, first addr=9898989898, thread_id=3
10-12 00:14:53.482: WARN/NotificationService(62): STOP command without a player
10-12 00:14:53.562: DEBUG/MediaPlayer(62): Couldn't open file on client side, trying server side
10-12 00:14:53.582: ERROR/MediaPlayerService(34): Couldn't open fd for content://settings/system/notification_sound
10-12 00:14:53.592: ERROR/MediaPlayer(62): Unable to to create media player
10-12 00:14:53.643: WARN/NotificationService(62): error loading sound for content://settings/system/notification_sound
10-12 00:14:53.643: WARN/NotificationService(62): java.io.IOException: setDataSource failed.: status=0x80000000
10-12 00:14:53.643: WARN/NotificationService(62): at android.media.MediaPlayer.setDataSource(Native Method)
10-12 00:14:53.643: WARN/NotificationService(62): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:716)
10-12 00:14:53.643: WARN/NotificationService(62): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:671)
10-12 00:14:53.643: WARN/NotificationService(62): at com.android.server.NotificationPlayer$CreationAndCompletionThread.run(NotificationPlayer.java:8)

View 1 Replies View Related

Android :: Change Background After Orientation Change

Jun 8, 2010

I have an image set as my background and when it is vertical, the image looks fine. However, when the orentation is changed, the image get streched out. If there a way that I can change the image based on the orentation of the device?

View 4 Replies View Related

Android :: Change Broadcast Receiver Priority

May 5, 2009

I have developed a music player and the application defines a broadcast receiver that handles MediaButton intents:

<application...>
<receiver android:name="MediaButtonIntentReceiver"> <intent-filter android:priority="32000"> <action android:name="android.intent.action.MEDIA_BUTTON"/> </intent-filter> </receiver>
</application>

which works well. My question is if it was possible to change the priority of this receiver from within the settings activity of my application. That way people could choose if they wanted my player as default handler of the headset buttons or not.

View 5 Replies View Related

Android :: Timezone Change Broadcast Receiver Not Working

Aug 30, 2010

I am trying to implement time zone change in broadcast receiver but its not working .my requirment is if i change the time zone it will go to another activity using broad cast receiver can anybody give example

View 2 Replies View Related

Android :: Change Orientation Of AlertDialog

Mar 25, 2009

I am building a AlertDialog in java code, so by default it is portrait but I want to show it in landscape orientation. How to do it in Java code?

View 2 Replies View Related

Android :: Screen Orientation Change

Oct 8, 2009

I notice when using the emulator that when the screen is flipped, I get a following logcat message:

INFO/WindowManager(589): onOrientationChanged, rotation changed to 1

How can I catch this in the code? I want to know whenever the orientation changes. I assume I have to set a listener, but I can't find an example anywhere.

View 6 Replies View Related

Android :: Dialogs On A Change Orientation

Mar 5, 2010

I'm doing an APP that shows some dialogs. Those dialogs are Alert dialogs, and when they are being showed if I change the orientation of the mobile I lost them...they are not being kept on the screen.

View 13 Replies View Related

Android :: Views - Orientation Change

Oct 1, 2009

Do Views know changes in orientation? In my case, I create popups from TextView and need to know when the orientation changes(porttrait<-- >landscape). I cannot depend on activity's onOrientationChange.

View 2 Replies View Related

Android :: Keep Screen On And Change Orientation

Feb 11, 2009

I am making an Android app which is currently coming along nicely - I've hit upon a couple of stumbling blocks.

1) How do I stop the screen from going dim/off and the phone locking while the application is running?

2) Can I force the phone to enter landscape mode on running my application?

View 2 Replies View Related

Android :: Possible Leak In Orientation Change

Jul 1, 2009

My app *sometimes* when orientation change, leaks Activities (getInstanceCount() increases from time to time) and i cannot figure out where references to my Activity or rather Context are kept - tried to use jhat but it couldn't help me much.

what is strange: it doesn't always happen on orientation change, so its even harder to fix.

btw when doing normal app life cycle - start, do something, exit - everything is ok - getInstanceCount() always returns 1.

View 5 Replies View Related

Android :: OnCreate And Orientation Change

Apr 28, 2010

I have an activity that checks stuffs online when it's created (is the GPS on and if not it asks if the user wants to turn it on).

The problem I'm having is that it is also doing it everytime I change the orientation of the screen.

I've read some comments on onConfigurationChanged() but is there a better way to be sure I'm checking the GPS only when the activity is first created?

View 4 Replies View Related

Android :: Dialog Is Leaked On Orientation Change

Jun 23, 2010

built a simple app that displays an alertDialog with two buttons.The problem is it's not getting dismissed when i change orientation. After change i get a leak warning on debugger and the dialog appears twice(pressing back hides the first dialog, only a second back dismisses it completely).

View 7 Replies View Related

Android :: Change Eclipse Layout Orientation

Nov 6, 2010

I want to know how to change the orientation of my layout inside of eclipse but when I click the "layout" button it still shows it as a vertical layout.

View 4 Replies View Related

Android :: How To Change Eclipse Layout Orientation?

Nov 6, 2010

I want to know how to change the orientation of my layout inside of eclipse.

View 1 Replies View Related

Android :: Orientation Change Crashes When Ids Not Unique

Mar 17, 2009

consider the simple layout:

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

View 9 Replies View Related

Android :: AppWidget Update On Orientation Change

Dec 29, 2009

I am developing a photo frame widget, all works except on an orientation change to landscape mode my appwidget doesn't display correctly as I have it set to portrait dimensions and it is too large for the display. I would like to run some code to resize the image so that everything displays correctly and it uses all the space that I allot. What is the correct way to do this? I can think of 2 methods however both seem inefficient. The first would be to register a broadcast reciever to take orientation changes, however I don't want to redo my appwidget everytime the phone is turned on its side as the majority of the time the homescreen is not showing when the orientation is changed (ie other apps are used, and I don't need my code running in the background). I only need it to run when the home screen is shown. The second would be to setup a service to manage my appwidget but that also seems inefficient to be always running in the background.

View 10 Replies View Related

Android :: Orientation Change Runtime Option

Apr 24, 2009

Is it possible to have a user choose how an app should respond to orientation changes? I have it set to android:screenOrientation="sensor" in the manifest but I would like users to be able to turn this on and off or set landscape or portrait orientation permanently.

View 5 Replies View Related

Android :: Application Restarts On Orientation Change

Nov 2, 2010

When I change orientation application restarts and I lost my current data.. I am using activity group which contain lots of activities when i change orientation application restarts from main activity. is it possible to avoid this application restart on orientation change?

View 4 Replies View Related

Android :: Orientation Change Handling On Widgets

May 31, 2009

Some of the content in my widget is based on custom drawing routines. is there any event i can listen for so i redraw and update this custom area when the orientation changes? currently my widget looks pretty screwed until the next widget update is requested.

View 3 Replies View Related







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