Consumer closed input channel or an error occurred. events=0x8 - android

D/AndroidRuntime(11752):
D/AndroidRuntime(11752): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime(11752): CheckJNI is ON
D/dalvikvm(11752): creating instr width table
E/jdwp (11752): pipe failed
W/ProcessState(11752): Opening '/dev/binder' failed: Too many open files
D/AndroidRuntime(11752): Calling main entry com.android.commands.am.Am
I/Mamarduke_Diag( 1726): Data is available now.
I/Mamarduke_Diag( 1726): exec result -->>> java.lang.NullPointerException
I/DMIC ( 1726): ---> java.lang.NullPointerException
I/System.out( 1726): *****wifi state end=1
D/dalvikvm( 1726): GC_EXPLICIT freed 31K, 41% free 7507K/12551K, external 1625K/2137K, paused 58ms
D/dalvikvm( 1726): GC_EXPLICIT freed 0K, 41% free 7507K/12551K, external 1625K/2137K, paused 58ms
I/System.out( 1726): ***run in test i=7,camera
I/System.out( 1726): ***run in test i=8,cec
I/System.out( 1726): ***run in test i=9,edid
I/System.out( 1726): *****wifi state start=1
I/Mamarduke_Diag( 1726): Data is available now.
I/Mamarduke_Diag( 1726): exec result -->>>
I/System.out( 1726): *****wifi state end=1
D/dalvikvm( 1726): GC_EXPLICIT freed 36K, 41% free 7474K/12551K, external 1625K/2137K, paused 57ms
D/dalvikvm( 1726): GC_EXPLICIT freed 0K, 41% free 7474K/12551K, external 1625K/2137K, paused 58ms
I/System.out( 1726): ***run in test i=10,iris
I/System.out( 1726): *****wifi state start=1
I/ActivityManager( 1491): Starting: Intent { act=com.android.camera.irison flg=0x10000000 cmp=com.ianc.apd/.testcase.cameraex.ImageCamera } from pid 1726
I/System.out( 1726): onCreate
I/System.out( 1726): onResume
I/System.out( 1726): test irist on
I/System.out( 1726): excuteCmd/sys/bus/spi/devices/spi2.0/irisstate
E/InputDispatcher( 1491): channel '40643898 com.ianc.apd/com.ianc.apd.testcase.cameraex.ImageCamera (server)' ~ Consumer closed input channel or an error occurred. events=0x8
E/InputDispatcher( 1491): channel '40643898 com.ianc.apd/com.ianc.apd.testcase.cameraex.ImageCamera (server)' ~ Channel is unrecoverably broken and will be disposed!
D/AndroidRuntime( 1726): Shutting down VM
W/dalvikvm( 1726): threadid=1: thread exiting with uncaught exception (group=0x40015560)
I/WindowManager( 1491): WINDOW DIED Window{40643898 com.ianc.apd/com.ianc.apd.testcase.cameraex.ImageCamera paused=false}
E/AndroidRuntime( 1726): FATAL EXCEPTION: main
E/AndroidRuntime( 1726): java.lang.RuntimeException: Could not read input channel file descriptors from parcel.
E/AndroidRuntime( 1726): at android.view.InputChannel.nativeReadFromParcel(Native Method)
E/AndroidRuntime( 1726): at android.view.InputChannel.readFromParcel(InputChannel.java:138)
E/AndroidRuntime( 1726): at android.view.IWindowSession$Stub$Proxy.add(IWindowSession.java:409)
E/AndroidRuntime( 1726): at android.view.ViewRoot.setView(ViewRoot.java:498)
E/AndroidRuntime( 1726): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
E/AndroidRuntime( 1726): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
E/AndroidRuntime( 1726): at android.view.Window$LocalWindowManager.addView(Window.java:424)
E/AndroidRuntime( 1726): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2170)
E/AndroidRuntime( 1726): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1668)
E/AndroidRuntime( 1726): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime( 1726): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
E/AndroidRuntime( 1726): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1726): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 1726): at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime( 1726): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1726): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 1726): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 1726): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 1726): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1491): Force finishing activity com.ianc.apd/.testcase.cameraex.ImageCamera
W/ActivityManager( 1491): Activity pause timeout for HistoryRecord{4069a248 com.ianc.apd/.testcase.cameraex.ImageCamera}
Why do Consumer closed input channel or an error occurred. events=0x8 happen after many times running? That is too say, my program can run at first, but after many times, the exception happen.
I read this: Input transport and input dispatcher error on 2.3, but I have no idea how to solve it!! Who can help me?
I run my program in real device. The android version is 2.3
Update 1:
I found the root cause of Could not read input channel file descriptors from parcel.
It is E/jdwp (11752): pipe failed.
Why do create pipe failed? Because the pipe is out of the max in the system. that is to say, we create a lot of pipe or file descriptors in the system. And then we found the reason and try to modify it: My friend change the code like that in his Activity: `Original source code:
private class MyHandler extends Handler {
MyHandler(Looper looper) {
super(looper);
}
#Override
public void handleMessage(Message msg) {
switch(msg.what) {
case RELEASE_CAMERA:
synchronized (CameraHolder.this) {
// In 'CameraHolder.open', the 'RELEASE_CAMERA' message
// will be removed if it is found in the queue. However,
// there is a chance that this message has been handled
// before being removed. So, we need to add a check
// here:
if (CameraHolder.this.mUsers == 0) releaseCamera();
}
break;
}
}
}
...
HandlerThread ht = new HandlerThread("CameraHolder");
ht.start();
mHandler = new MyHandler(ht.getLooper());
change to
private class MyHandler extends Handler {
MyHandler(Looper looper) {
super(looper);
}
#Override
public void handleMessage(Message msg) {
switch(msg.what) {
case RELEASE_CAMERA:
synchronized (CameraHolder.this) {
// In 'CameraHolder.open', the 'RELEASE_CAMERA' message
// will be removed if it is found in the queue. However,
// there is a chance that this message has been handled
// before being removed. So, we need to add a check
// here:
if (CameraHolder.this.mUsers == 0) releaseCamera();
}
break;
}
}
}
mHandler = new MyHandler();
Those file descriptors will reduce obviously. Why? how to explain this case? And I add mHandler.removemessage this function to onPause in my Activity. And Those file descriptors also reduce obviously. why? who can explain this case for me? I am trying to understand this.

Benni05 found a solution here, by setting android:configChanges="orientation" property for activity #AndroidManifest. It work for me(where i get an error with api lvl.11 installed devices). Good luck!

it is most probably because of having a wrong xml resource file. for me i put colors in strings.xml and got this errors. then i created colors.xml and now it works.

Related

How to fix the error Unfortunately, the process "android.process.acore has stopped"?

we are porting whole android open source for the device Imx-6X-solo board.Developing and re-skinning all the applications.Every thing is done properly and device is ready now. But the problem is I am getting " Unfortunately, the process "android.process.acore has stopped" " error during uninstallation of the application. That is when I go to
Settings --> apps --> any third party app installed --> Uninstall .
Then I am getting this error.But app is successfully uninstalling. Can anyone please help me.. Thanks in adavance.
The logs while uninstalling are as follows..
I/ContentGridAdapter( 2576): ------- book pkg name for uninstalling is ------
com.vienom.kb.nini
D/FableSyncService( 2366): Tell package managere to uninstall: com.vienom.kb.nini
I/FableSyncManager( 2366): start processContentUninstallRequest
D/log ( 2366): ENTERED unInstallFableContent com.vienom.kb.nini
D/Log ( 2366): PACKAGE IS INSTALLED
D/log ( 2366): START FABLE UNINSTALL APP
I/FableSyncManager( 2366): exit processContentUninstallRequest
D/FableSyncService( 2366): package manager uninstalling..: com.vienom.kb.nini
W/audio_hw_primary( 1932): start_output_stream...
W/audio_hw_primary( 1932): headphone 0 ,headset 0 ,speaker 2, earpiece 0,
W/audio_hw_primary( 1932): card 0, port 0 device 2
I/PackageManager( 2059): Removing non-system package:com.vienom.kb.nini
I/ActivityManager( 2059): Force stopping package com.vienom.kb.nini uid=10034
D/dalvikvm( 2059): GC_CONCURRENT freed 360K, 11% free 7818K/8775K, paused 5ms+3ms
I/ActivityManager( 2059): Force stopping package com.vienom.kb.nini uid=10034
D/dalvikvm( 2576): GC_EXPLICIT freed 316K, 15% free 7755K/9031K, paused 2ms+2ms
D/PackageManager( 2059): generateServicesMap(android.accounts.AccountAuthenticator): 2 services unchanged
D/PackageManager( 2059): generateServicesMap(android.content.SyncAdapter): 1 services unchanged
W/ResourceType( 2059): Failure getting entry for 0x7f060000 (t=5 e=0) in package 0 (error -75)
D/BackupManagerService( 2059): Received broadcast Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.vienom.kb.nini flg=0x10000010 (has extras) }
V/BackupManagerService( 2059): removePackageParticipantsLocked: #1
D/dalvikvm( 2289): GC_EXPLICIT freed 358K, 8% free 5955K/6471K, paused 2ms+10ms
W/PluginManager( 2472): Can't find plugin: com.vienom.kb.nini
E/ActivityThread( 2223): Failed to find provider info for com.android.inputmethod.latin.dictionarypack
E/BinaryDictionaryGetter( 2223): Could not find a dictionary pack
W/Searchables( 2059): No global search activity found
D/VoicemailCleanupService( 2289): Cleaning up data for package: com.vienom.kb.nini
W/dalvikvm( 2289): threadid=15: thread exiting with uncaught exception (group=0x40a2b1f8)
E/AndroidRuntime( 2289): FATAL EXCEPTION: IntentService[VoicemailCleanupService]
E/AndroidRuntime( 2289): java.lang.SecurityException: The caller must have permission: com.android.voicemail.permission.ADD_VOICEMAIL
E/AndroidRuntime( 2289): at com.android.providers.contacts.VoicemailPermissions.checkCallerHasOwnVoicemailAccess(VoicemailPermissions.java:52)
E/AndroidRuntime( 2289): at com.android.providers.contacts.VoicemailContentProvider.checkPermissionsAndCreateUriData(VoicemailContentProvider.java:301)
E/AndroidRuntime( 2289): at com.android.providers.contacts.VoicemailContentProvider.delete(VoicemailContentProvider.java:129)
E/AndroidRuntime( 2289): at android.content.ContentProvider$Transport.delete(ContentProvider.java:213)
E/AndroidRuntime( 2289): at android.content.ContentResolver.delete(ContentResolver.java:822)
E/AndroidRuntime( 2289): at com.android.providers.contacts.VoicemailCleanupService.handleIntentInternal(VoicemailCleanupService.java:51)
E/AndroidRuntime( 2289): at com.android.providers.contacts.VoicemailCleanupService.onHandleIntent(VoicemailCleanupService.java:40)
E/AndroidRuntime( 2289): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
E/AndroidRuntime( 2289): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2289): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 2289): at android.os.HandlerThread.run(HandlerThread.java:60)
I/ActivityManager( 2059): Start proc com.android.keychain for broadcast com.android.keychain/.KeyChainBroadcastReceiver: pid=2613 uid=1000 gids={1015, 3003, 2001, 3002, 3001}
D/dalvikvm( 2059): GC_CONCURRENT freed 635K, 13% free 7722K/8775K, paused 3ms+5ms
D/dalvikvm( 2059): GC_EXPLICIT freed 105K, 13% free 7698K/8775K, paused 5ms+5ms
D/log ( 2366): ENTERED PACKAGE UNINSTALLED OBSERVER
D/Log ( 2366): DELETE SUCCEEDEDcom.vienom.kb.nini
I/ActivityManager( 2059): Start proc com.android.defcontainer for service com.android.defcontainer/.DefaultContainerService: pid=2627 uid=10005 gids={1015, 2001}
I/FableDatabase( 2366): deleteContentName: 9001Status 0
I/FableDatabase( 2366):
I/FableDatabase( 2366): Thumbnail not found for :com.vienom.kb.nini
I/FableDatabase( 2366): Deleted from device: /mnt/sdcard/fable/books/22_fable_full.apk
D/MediaProvider( 2211): object removed 50
I got the solution. By mistake I removed the Contacts app. Every time, Contacts Storage app is checking for contacts.So Now again I installed Contacts.apk. And it works fine after installing.
one more solution is
Settings --> apps --> All --> Contacts Storage --> clear data and Force stop
Backup your contacts. Go to settings and clear the "Data" of Contact Storage. This will remove all your contacts. After that, restore your contacts back and the error will go. This basically happens when FB messes up with your contacts.
it is not directly contacts related. 10 minutes ago this message start to popup every 1 second (!). It started to popup after i removed my account from DROPBOX. I tried rebooting several times but nothing helped.
Finally i decided to re-link the account i removed from DROPBOX and then the popup message stopped !
The problem appears because there is a broken link. To some it appears with contacts. To me it happend with DROPBOX. I assume to others it can happend with a different app.
It is an Android failure, not an app faluire.
(I use Galaxy S4 with Kitkat 4.4.2)
Good Luck,
Yuval
My repair has not been posted as of yet - here is another.
Settings->applications manager->bottom left menu button / Choose reset app preferences / Choose Reset Apps.
This worked for me ,,, Must have shut something off that android/Samsung didn't like
cheers

android not honoring trigger.io's tabs.openWithOptions for server side redirect

I've got some basic trigger.io code to open a modal dialog for oauth2 authentication:
var url_auth = "http://10.0.0.70/oauth2/authorize";
var oauth_client_id = "123";
var oauth_redirect_uri = "http://done.com/oauth2/complete";
forge.tabs.openWithOptions({
url: url_auth + "?response_type=token&client_id="+ oauth_client_id + "&redirect_url=" + oauth_redirect_uri,
pattern: oauth_redirect_uri + "*",
title: "Authorizing"
}, function(data) { ... });
When the user isn't authenticated, the server redirects to http://10.0.0.70/users to present a login form.
Running the code in an iOS6 simulator yields the correct result:
open modal dialog
server redirects to login form, presented within the dialog
user can authenticate
server redirects to oauth_redirect_uri which trigger catches and closes the dialog
When I run in an android simulator, the initial page is loaded, but then the app crashes.
I see the /oauth2/authorize url being processed on the server
all I see in the debug dialog is "subView load http://10.0.0.70:3000/users"
The more details around the error are (nothing after this in logs):
[DEBUG] Native call tabs.open with task.params: {"url":"http://10.0.0.70:3000/oauth2/authorize?response_type=token&client_id=123&redirect_url=http://www.diveboatbuddy.com/oauth2/complete","pattern":"^http://www.diveboatbuddy.com/oauth2/complete.*$","title":"Authorizing"}
[INFO] Displaying modal view.
[DEBUG] Returned: {"content":null,"callid":"0F7BA94D-08AD-439D-B44F-80BB22540CD4","status":"success"}
[DEBUG] Native call logging.log with task.params: {"message":"[FORGE] 'Successfully subscribed for push notifications'","level":20}
[INFO] [FORGE] 'Successfully subscribed for push notifications'
[DEBUG] Returned: {"content":null,"callid":"030EF36D-C17F-42E8-8F9E-0221A40153D1","status":"success"}
[INFO] subView load http://10.0.0.70:3000/users
So it looks like the server has redirected correctly, but the trigger.io app isn't rendering the new server page.
adb logcat output of the problem:
D/Forge ( 394): Returned: {"content":null,"callid":"03F62CF7-8B33-425C-ABD5-2BA64565B789","status":"success"}
D/dalvikvm( 394): GC_EXTERNAL_ALLOC freed 349 objects / 24336 bytes in 41ms
I/Forge ( 394): subView load http://10.0.0.70:3000/users
D/AndroidRuntime( 394): Shutting down VM
W/dalvikvm( 394): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
E/AndroidRuntime( 394): FATAL EXCEPTION: main
E/AndroidRuntime( 394): java.lang.NoSuchMethodError: android.webkit.WebView.removeJavascriptInterface
E/AndroidRuntime( 394): at io.trigger.forge.android.modules.tabs.ModalView$2$3.shouldOverrideUrlLoading(ModalView.java:310)
E/AndroidRuntime( 394): at android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:216)
E/AndroidRuntime( 394): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:323)
E/AndroidRuntime( 394): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 394): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 394): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 394): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 394): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 394): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 394): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 394): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 59): Force finishing activity io.trigger.forge1979a236289211e2bbe612313d31f141/io.trigger.forge.android.core.ForgeActivity
I/ARMAssembler( 59): generated scanline__00000077:03515104_00000000_00000000 [ 33 ipp] (47 ins) at [0x3446c0:0x34477c] in 5998000 ns
W/ActivityManager( 59): Activity pause timeout for HistoryRecord{43f928a8 io.trigger.forge1979a236289211e2bbe612313d31f141/io.trigger.forge.android.core.ForgeActivity}
I/Process ( 394): Sending signal. PID: 394 SIG: 9
I/ActivityManager( 59): Process io.trigger.forge1979a236289211e2bbe612313d31f141 (pid 394) has died.
W/ActivityManager( 59): Scheduling restart of crashed service io.trigger.forge1979a236289211e2bbe612313d31f141/com.parse.PushService in 5000ms
I/WindowManager( 59): WIN DEATH: Window{44002988 io.trigger.forge1979a236289211e2bbe612313d31f141/io.trigger.forge.android.core.ForgeActivity paused=false}
I/ActivityManager( 59): Start proc io.trigger.forge1979a236289211e2bbe612313d31f141 for service io.trigger.forge1979a236289211e2bbe612313d31f141/com.parse.PushService: pid=422 uid=10036 gids={1015, 3003}
Has anyone come across this issue. Is there a work around or a bug?
This was fixed in v1.4.34 of the Trigger.io platform: http://docs.trigger.io/en/v1.4/release-notes.html#v1-4-34.

App force close when executing menu inflater in Android 4.0.4

I built an app base on android api version 8, I choose this option because I think it will work in the newer version of Android, but when I try to do something as I mention in the title I got my app force close. The application starts and works normally, only error in menu inflater, here is my code :
#Override
public boolean onOptionsItemSelected(MenuItem item) {
// TODO Auto-generated method stub
Toast.makeText(this, "About Developer", Toast.LENGTH_LONG).show();
Intent i = new Intent(this, about.class);
startActivity(i);
return true;
}
does anyone have any idea to fix it?
Logcat :
09-10 14:07:02.630: DEBUG/AndroidRuntime(1631): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
09-10 14:07:02.646: DEBUG/AndroidRuntime(1631): CheckJNI is ON
09-10 14:07:10.746: DEBUG/AndroidRuntime(1631): Calling main entry com.android.commands.pm.Pm
09-10 14:07:12.027: DEBUG/dalvikvm(266): GC_EXPLICIT freed 10K, 54% free 2552K/5511K, external 716K/1038K, paused 360ms
09-10 14:07:12.086: WARN/ActivityManager(68): No content provider found for:
09-10 14:07:12.237: WARN/ActivityManager(68): No content provider found for:
09-10 14:07:12.307: DEBUG/PackageParser(68): Scanning package: /data/app/vmdl-674477132.tmp
09-10 14:07:12.707: INFO/PackageManager(68): Removing non-system package:com.dg.tkd
09-10 14:07:12.707: INFO/ActivityManager(68): Force stopping package com.dg.tkd uid=10036
09-10 14:07:12.837: INFO/Process(68): Sending signal. PID: 1618 SIG: 9
09-10 14:07:12.928: ERROR/InputDispatcher(68): channel '4079e2f8 com.dg.tkd/com.dg.tkd.digital_tkd (server)' ~ Consumer closed input channel or an error occurred. events=0x8
09-10 14:07:12.928: ERROR/InputDispatcher(68): channel '4079e2f8 com.dg.tkd/com.dg.tkd.digital_tkd (server)' ~ Channel is unrecoverably broken and will be disposed!
09-10 14:07:12.947: INFO/ActivityManager(68): Force finishing activity HistoryRecord{406a3e48 com.dg.tkd/.digital_tkd}
09-10 14:07:12.986: INFO/WindowManager(68): WIN DEATH: Window{407ea958 com.dg.tkd/com.dg.tkd.about paused=false}
09-10 14:07:13.037: INFO/WindowManager(68): WIN DEATH: Window{4079e2f8 com.dg.tkd/com.dg.tkd.digital_tkd paused=false}
09-10 14:07:13.086: ERROR/InputDispatcher(68): Received spurious receive callback for unknown input channel. fd=161, events=0x8
09-10 14:07:13.447: DEBUG/dalvikvm(68): GC_CONCURRENT freed 1043K, 46% free 4596K/8455K, external 3251K/3627K, paused 24ms+31ms
09-10 14:07:13.788: DEBUG/PackageManager(68): Scanning package com.dg.tkd
09-10 14:07:13.788: INFO/ActivityManager(68): Start proc com.android.launcher for activity com.android.launcher/com.android.launcher2.Launcher: pid=1641 uid=10001 gids={}
09-10 14:07:13.836: INFO/PackageManager(68): Package com.dg.tkd codePath changed from /data/app/com.dg.tkd-1.apk to /data/app/com.dg.tkd-2.apk; Retaining data and using new
09-10 14:07:14.146: INFO/PackageManager(68): Unpacking native libraries for /data/app/com.dg.tkd-2.apk
09-10 14:07:14.707: DEBUG/installd(35): DexInv: --- BEGIN '/data/app/com.dg.tkd-2.apk' ---
09-10 14:07:15.457: DEBUG/dalvikvm(1649): DexOpt: load 72ms, verify+opt 125ms
09-10 14:07:15.537: DEBUG/installd(35): DexInv: --- END '/data/app/com.dg.tkd-2.apk' (success) ---
09-10 14:07:15.546: WARN/PackageManager(68): Code path for pkg : com.dg.tkd changing from /data/app/com.dg.tkd-1.apk to /data/app/com.dg.tkd-2.apk
09-10 14:07:15.546: WARN/PackageManager(68): Resource path for pkg : com.dg.tkd changing from /data/app/com.dg.tkd-1.apk to /data/app/com.dg.tkd-2.apk
09-10 14:07:15.546: DEBUG/PackageManager(68): Activities: com.dg.tkd.digital_tkd com.dg.tkd.about
09-10 14:07:15.747: INFO/installd(35): move /data/dalvik-cache/data#app#com.dg.tkd-2.apk#classes.dex -> /data/dalvik-cache/data#app#com.dg.tkd-2.apk#classes.dex
09-10 14:07:15.757: DEBUG/PackageManager(68): New package installed in /data/app/com.dg.tkd-2.apk
09-10 14:07:16.047: INFO/WindowManager(68): Setting rotation to 0, animFlags=1
09-10 14:07:16.146: INFO/ActivityManager(68): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2 nav=3/1 orien=1 layout=18 uiMode=17 seq=48}
09-10 14:07:16.717: INFO/ActivityManager(68): Force stopping package com.dg.tkd uid=10036
09-10 14:07:17.717: INFO/ActivityThread(1641): Pub com.android.launcher2.settings: com.android.launcher2.LauncherProvider
09-10 14:07:19.727: DEBUG/dalvikvm(1641): GC_EXTERNAL_ALLOC freed 457K, 54% free 2684K/5767K, external 1032K/1038K, paused 107ms
09-10 14:07:20.607: INFO/ActivityManager(68): Displayed com.android.launcher/com.android.launcher2.Launcher: +7s521ms
09-10 14:07:20.687: WARN/InputManagerService(68): Got RemoteException sending setActive(false) notification to pid 1618 uid 10036
09-10 14:07:21.156: WARN/WindowManager(68): App freeze timeout expired.
09-10 14:07:21.657: INFO/ActivityManager(68): Force stopping package com.dg.tkd uid=10036
09-10 14:07:22.097: DEBUG/dalvikvm(1641): GC_EXTERNAL_ALLOC freed 97K, 53% free 2718K/5767K, external 1561K/1572K, paused 229ms
09-10 14:07:22.256: DEBUG/dalvikvm(68): GC_EXPLICIT freed 514K, 47% free 4504K/8455K, external 3247K/3627K, paused 397ms
09-10 14:07:23.517: DEBUG/dalvikvm(68): GC_EXPLICIT freed 18K, 47% free 4486K/8455K, external 3247K/3627K, paused 240ms
09-10 14:07:25.356: WARN/RecognitionManagerService(68): no available voice recognition services found
09-10 14:07:26.056: DEBUG/dalvikvm(68): GC_EXPLICIT freed 129K, 47% free 4515K/8455K, external 3247K/3627K, paused 391ms
09-10 14:07:26.906: INFO/installd(35): unlink /data/dalvik-cache/data#app#com.dg.tkd-1.apk#classes.dex
09-10 14:07:27.037: DEBUG/AndroidRuntime(1631): Shutting down VM
09-10 14:07:27.097: INFO/AndroidRuntime(1631): NOTE: attach of thread 'Binder Thread #4' failed
09-10 14:07:27.117: DEBUG/dalvikvm(1631): GC_CONCURRENT freed 100K, 72% free 293K/1024K, external 0K/0K, paused 16ms+18ms
09-10 14:07:27.157: DEBUG/dalvikvm(1631): Debugger has detached; object registry had 1 entries
09-10 14:07:29.029: DEBUG/AndroidRuntime(1657): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
09-10 14:07:29.029: DEBUG/AndroidRuntime(1657): CheckJNI is ON
09-10 14:07:30.966: DEBUG/dalvikvm(1641): GC_CONCURRENT freed 224K, 50% free 2915K/5767K, external 1959K/2091K, paused 9ms+9ms
09-10 14:07:31.826: DEBUG/AndroidRuntime(1657): Calling main entry com.android.commands.am.Am
09-10 14:07:32.726: INFO/ActivityManager(68): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.dg.tkd/.digital_tkd } from pid 1657
09-10 14:07:32.857: DEBUG/AndroidRuntime(1657): Shutting down VM
09-10 14:07:32.926: INFO/AndroidRuntime(1657): NOTE: attach of thread 'Binder Thread #3' failed
09-10 14:07:33.037: DEBUG/dalvikvm(1657): GC_CONCURRENT freed 102K, 69% free 319K/1024K, external 0K/0K, paused 4ms+2ms
09-10 14:07:33.108: DEBUG/jdwp(1657): Got wake-up signal, bailing out of select
09-10 14:07:33.108: DEBUG/dalvikvm(1657): Debugger has detached; object registry had 1 entries
09-10 14:07:33.327: WARN/ActivityManager(68): Activity pause timeout for HistoryRecord{40796458 com.android.launcher/com.android.launcher2.Launcher}
09-10 14:07:33.446: INFO/ActivityManager(68): Start proc com.dg.tkd for activity com.dg.tkd/.digital_tkd: pid=1666 uid=10036 gids={}
09-10 14:07:34.347: INFO/WindowManager(68): Setting rotation to 1, animFlags=1
09-10 14:07:34.386: INFO/ActivityManager(68): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2 nav=3/1 orien=2 layout=18 uiMode=17 seq=49}
09-10 14:07:35.997: INFO/ActivityManager(68): Displayed com.dg.tkd/.digital_tkd: +2s584ms
09-10 14:07:37.786: DEBUG/dalvikvm(266): GC_EXPLICIT freed 8K, 54% free 2551K/5511K, external 716K/1038K, paused 381ms
09-10 14:07:38.046: WARN/IInputConnectionWrapper(1641): showStatusIcon on inactive InputConnection
09-10 14:07:38.337: DEBUG/dalvikvm(1641): GC_EXTERNAL_ALLOC freed 33K, 50% free 2899K/5767K, external 1953K/2091K, paused 88ms
09-10 14:07:38.896: DEBUG/dalvikvm(68): GC_EXPLICIT freed 298K, 47% free 4490K/8455K, external 3247K/3627K, paused 172ms
09-10 14:07:40.007: DEBUG/dalvikvm(1641): GC_EXTERNAL_ALLOC freed 48K, 50% free 2891K/5767K, external 2754K/2940K, paused 104ms
09-10 14:07:41.847: DEBUG/dalvikvm(317): GC_EXPLICIT freed 12K, 55% free 2578K/5703K, external 716K/1038K, paused 167ms
09-10 14:07:45.489: INFO/ActivityManager(68): Process android.process.media (pid 210) has died.
09-10 14:07:47.356: DEBUG/dalvikvm(341): GC_EXPLICIT freed 5K, 55% free 2520K/5511K, external 716K/1038K, paused 644ms
09-10 14:07:49.816: DEBUG/dalvikvm(1641): GC_EXTERNAL_ALLOC freed 9K, 51% free 2882K/5767K, external 5999K/7492K, paused 167ms
09-10 14:08:18.196: WARN/KeyCharacterMap(1666): No keyboard for id 0
09-10 14:08:18.196: WARN/KeyCharacterMap(1666): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
09-10 14:08:21.546: INFO/ActivityManager(68): Starting: Intent { cmp=com.dg.tkd/.about } from pid 1666
09-10 14:08:22.097: DEBUG/dalvikvm(1666): GC_EXTERNAL_ALLOC freed 65K, 52% free 2608K/5379K, external 908K/1038K, paused 97ms
09-10 14:08:23.776: INFO/ActivityManager(68): Displayed com.dg.tkd/.about: +2s112ms

Nested ViewFlipper

I am trying to get nested viewflippers set up with the following setup
Top_ViewFlipper
- Type 1
Sub_ViewFlipper
- SubType 1
- SubType 2
- SubType 3
- Type 2
Sub_ViewFlipper
- SubType 1
- SubType 2
- SubType 3
Source can be found here: https://github.com/platinummonkey/TXLF-App/tree/master/android
The following links contain all the XML and source relevant to this problem (instead of viewing a wall of text):
sessions.xml (main xml)
session_day0.xml
session_day1.xml
session_track.xml
session_two_line_list.xml
Sessions.java
SessionListAdapter.java
Trace of Current Error:
--------- beginning of /dev/log/main
--------- beginning of /dev/log/system
D/KeyguardViewMediator( 981): wakeWhenReadyLocked(26)
I/power ( 981): *** set_screen_state 1
V/$$$$$$ ( 8060): In Method: ACTION_SCREEN_ON
V/$$$$$$ ( 8060): In service onStart: REGISTERED RECEIVER
D/SurfaceFlinger( 981): Screen about to return, flinger = 0x95b38
V/$$$$$$ ( 8060): In Method: ACTION_USER_PRESENT
I/ActivityManager( 981): Start proc com.android.settings for broadcast com.android.settings/.widget.SettingsAppWidgetProvider: pid=8945 uid=1000 gids={1015, 3002, 3001, 3003}
W/InputManagerService( 981): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#40699050
D/szipinf ( 8945): Initializing inflate state
V/$$$$$$ ( 8060): In service onStart: REGISTERED RECEIVER
D/szipinf ( 8945): Initializing inflate state
D/SettingsAppWidgetProvider( 8945): Widget is from a previous version... Let's update
D/SettingsAppWidgetProvider( 8945): No instances yet... Wait for at least one instance to exist before adding global settings
I/ActivityManager( 981): No longer want com.anod.calendar (pid 8541): hidden #16
W/ActivityManager( 981): Scheduling restart of crashed service com.anod.calendar/.services.UpdateService in 5000ms
I/ActivityManager( 981): Start proc com.anod.calendar for service com.anod.calendar/.services.UpdateService: pid=8953 uid=10083 gids={1015}
D/dalvikvm( 967): GC_EXPLICIT freed 12K, 51% free 2674K/5379K, external 0K/0K, paused 133ms
D/szipinf ( 8953): Initializing inflate state
I/ActivityThread( 8953): Pub com.anod.calendar.events.provider: com.anod.calendar.scrollable.ScrollableDataProvider
I/dalvikvm( 8953): Could not find method android.appwidget.AppWidgetManager.notifyAppWidgetViewDataChanged, referenced from method com.anod.calendar.services.UpdateService.updateWidgets
D/dalvikvm( 967): GC_EXPLICIT freed <1K, 51% free 2674K/5379K, external 0K/0K, paused 63ms
W/dalvikvm( 8953): VFY: unable to resolve virtual method 151: Landroid/appwidget/AppWidgetManager;.notifyAppWidgetViewDataChanged ([II)V
D/dalvikvm( 8953): VFY: replacing opcode 0x6e at 0x0024
D/SimpleCal( 8953): Register content observer : 0
D/SimpleCal( 8953): Unregister content observer : 1
D/SimpleCal( 8953): Unregister content observer : 2
D/dalvikvm( 967): GC_EXPLICIT freed <1K, 51% free 2674K/5379K, external 0K/0K, paused 45ms
D/SimpleCal( 8953): Register content observer : 0
D/SimpleCal( 8953): Unregister content observer : 1
D/SimpleCal( 8953): Unregister content observer : 2
D/AndroidRuntime( 8964):
D/AndroidRuntime( 8964): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
I/AndroidRuntime( 8964): Heap size: -Xmx32m
D/AndroidRuntime( 8964): CheckJNI is OFF
D/dalvikvm( 8964): creating instr width table
D/AndroidRuntime( 8964): Calling main entry com.android.commands.pm.Pm
D/AndroidRuntime( 8964): Shutting down VM
D/dalvikvm( 8964): GC_CONCURRENT freed 103K, 70% free 307K/1024K, external 0K/0K, paused 0ms+1ms
D/dalvikvm( 8964): Debugger has detached; object registry had 1 entries
I/AndroidRuntime( 8964): NOTE: attach of thread 'Binder Thread #3' failed
D/AndroidRuntime( 8974):
D/AndroidRuntime( 8974): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
I/AndroidRuntime( 8974): Heap size: -Xmx32m
D/AndroidRuntime( 8974): CheckJNI is OFF
D/dalvikvm( 8974): creating instr width table
D/AndroidRuntime( 8974): Calling main entry com.android.commands.am.Am
I/ActivityManager( 981): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=org.texaslinuxfest.txlf/.TxlfActivity } from pid 8974
I/ActivityManager( 981): Start proc org.texaslinuxfest.txlf for activity org.texaslinuxfest.txlf/.TxlfActivity: pid=8982 uid=10100 gids={3003, 1006}
D/AndroidRuntime( 8974): Shutting down VM
D/dalvikvm( 8974): GC_CONCURRENT freed 103K, 69% free 325K/1024K, external 0K/0K, paused 0ms+1ms
D/dalvikvm( 8974): Debugger has detached; object registry had 1 entries
I/AndroidRuntime( 8974): NOTE: attach of thread 'Binder Thread #3' failed
E/jdwp ( 8982): Failed sending reply to debugger: Broken pipe
D/dalvikvm( 8982): Debugger has detached; object registry had 1 entries
D/szipinf ( 8982): Initializing inflate state
D/dalvikvm( 8982): GC_EXTERNAL_ALLOC freed 44K, 50% free 2692K/5379K, external 0K/0K, paused 56ms
V/txlf ( 8982): App already installed on your phone
D/txlf ( 8982): Guide hasn't expired
V/txlf ( 8982): Guide is ready - Sessions available
I/ActivityManager( 981): Displayed org.texaslinuxfest.txlf/.TxlfActivity: +406ms (total +4m46s12ms)
V/$$$$$$ ( 8060): In service onStart: REGISTERED RECEIVER
I/ActivityManager( 981): Starting: Intent { cmp=org.texaslinuxfest.txlf/.Sessions (has extras) } from pid 8982
D/Sessions Activity( 8982): Got guide through intent Serializable
W/ResourceType( 8982): getEntry failing because entryIndex 12 is beyond type entryCount 12
W/ResourceType( 8982): Failure getting entry for 0x7f03000c (t=2 e=12) in package 0 (error -2147483647)
D/AndroidRuntime( 8982): Shutting down VM
W/dalvikvm( 8982): threadid=1: thread exiting with uncaught exception (group=0x40015560)
E/AndroidRuntime( 8982): FATAL EXCEPTION: main
E/AndroidRuntime( 8982): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.texaslinuxfest.txlf/org.texaslinuxfest.txlf.Sessions}: android.content.res.Resources$NotFoundException: Resource ID #0x7f03000c
E/AndroidRuntime( 8982): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1768)
E/AndroidRuntime( 8982): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
E/AndroidRuntime( 8982): at android.app.ActivityThread.access$1500(ActivityThread.java:123)
E/AndroidRuntime( 8982): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
E/AndroidRuntime( 8982): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 8982): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 8982): at android.app.ActivityThread.main(ActivityThread.java:3835)
E/AndroidRuntime( 8982): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 8982): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 8982): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
E/AndroidRuntime( 8982): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
E/AndroidRuntime( 8982): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 8982): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f03000c
E/AndroidRuntime( 8982): at android.content.res.Resources.getValue(Resources.java:929)
E/AndroidRuntime( 8982): at android.content.res.Resources.loadXmlResourceParser(Resources.java:1955)
E/AndroidRuntime( 8982): at android.content.res.Resources.getLayout(Resources.java:768)
E/AndroidRuntime( 8982): at android.view.LayoutInflater.inflate(LayoutInflater.java:318)
E/AndroidRuntime( 8982): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
E/AndroidRuntime( 8982): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:212)
E/AndroidRuntime( 8982): at android.app.Activity.setContentView(Activity.java:1657)
E/AndroidRuntime( 8982): at org.texaslinuxfest.txlf.Sessions.onCreate(Sessions.java:70)
E/AndroidRuntime( 8982): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 8982): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1722)
E/AndroidRuntime( 8982): ... 11 more
W/ActivityManager( 981): Force finishing activity org.texaslinuxfest.txlf/.Sessions
W/ActivityManager( 981): Force finishing activity org.texaslinuxfest.txlf/.TxlfActivity
W/ActivityManager( 981): Activity pause timeout for HistoryRecord{40708c48 org.texaslinuxfest.txlf/.Sessions}
I/ActivityManager( 981): No longer want com.android.defcontainer (pid 8900): hidden #16
I/Process ( 8982): Sending signal. PID: 8982 SIG: 9
I/ActivityManager( 981): Process org.texaslinuxfest.txlf (pid 8982) has died.
I/WindowManager( 981): WIN DEATH: Window{407c4aa8 org.texaslinuxfest.txlf/org.texaslinuxfest.txlf.TxlfActivity paused=true}
D/dalvikvm( 981): GC_CONCURRENT freed 1979K, 51% free 7640K/15431K, external 3673K/3889K, paused 12ms+11ms
Right Now it just errors out, two commits prior I had one primary Viewflipper working, but nesting it seems to have broken things... even after manually adding listviews to the nested viewflipper (instead of using a generic method).
I am having trouble assigning assigning the SubTypes to the appropriate subViewflipper. Does anyone have an example of this either XML or programmatically? I have yet to find any examples on using nested viewflippers. Optionally tab host might work, but I would prefer text-only buttons and do like the animations that come with viewflipper.
GITHUB repo: https://github.com/agoransson/nested_view_flippers
Okay, this will be a big answer... but I hope it's what you were looking for.
The activity:
private GestureDetector gestureScanner;
private ViewFlipper rootFlipper;
private ViewFlipper flipper1, flipper2;
private Animation animFlipInNext, animFlipOutNext;
private Animation animFlipInPrevious, animFlipOutPrevious;
private Animation rootAnimFlipInNext, rootAnimFlipOutNext;
private Animation rootAnimFlipInPrevious, rootAnimFlipOutPrevious;
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// Root flipper
rootFlipper = (ViewFlipper) findViewById(R.id.rootFlipper);
// Content flippers
flipper1 = (ViewFlipper) findViewById(R.id.viewFlipper1);
flipper2 = (ViewFlipper) findViewById(R.id.viewFlipper2);
gestureScanner = new GestureDetector(this);
// Animations
animFlipInNext = AnimationUtils.loadAnimation(this, R.anim.flipinnext);
animFlipOutNext = AnimationUtils.loadAnimation(this, R.anim.flipoutnext);
animFlipInPrevious = AnimationUtils.loadAnimation(this,
R.anim.flipinprevious);
animFlipOutPrevious = AnimationUtils.loadAnimation(this,
R.anim.flipoutprevious);
rootAnimFlipInNext = AnimationUtils.loadAnimation(this,
R.anim.rootflipinnext);
rootAnimFlipOutNext = AnimationUtils.loadAnimation(this,
R.anim.rootflipoutnext);
rootAnimFlipInPrevious = AnimationUtils.loadAnimation(this,
R.anim.rootflipinprevious);
rootAnimFlipOutPrevious = AnimationUtils.loadAnimation(this,
R.anim.rootflipoutprevious);
}
#Override
public boolean onTouchEvent(MotionEvent event) {
return gestureScanner.onTouchEvent(event);
}
#Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
float velocityY) {
Log.i("TEST", "Fling!!");
if (Math.abs(velocityY) > Math.abs(velocityX)) {
if (velocityY > 0) {
rootFlipper.setInAnimation(rootAnimFlipInNext);
rootFlipper.setOutAnimation(rootAnimFlipOutNext);
rootFlipper.showNext();
} else if (velocityY < 0) {
rootFlipper.setInAnimation(rootAnimFlipInPrevious);
rootFlipper.setOutAnimation(rootAnimFlipOutPrevious);
rootFlipper.showPrevious();
}
} else {
if (velocityX > 0) {
ViewFlipper v = (ViewFlipper) rootFlipper.getCurrentView();
v.setInAnimation(animFlipInNext);
v.setOutAnimation(animFlipOutNext);
v.showNext();
} else if (velocityX < 0) {
ViewFlipper v = (ViewFlipper) rootFlipper.getCurrentView();
v.setInAnimation(animFlipInPrevious);
v.setOutAnimation(animFlipOutPrevious);
v.showPrevious();
}
}
return true;
}
The layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ViewFlipper
android:id="#+id/rootFlipper"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ViewFlipper
android:id="#+id/viewFlipper1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:id="#+id/innerone"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ff0000"
android:orientation="vertical" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="LAYOUT 1-1"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
<LinearLayout
android:id="#+id/innertwo"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ff0000"
android:orientation="vertical" >
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="LAYOUT 1-2"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
<LinearLayout
android:id="#+id/innerthree"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ff0000"
android:orientation="vertical" >
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="LAYOUT 1-3"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
</ViewFlipper>
<ViewFlipper
android:id="#+id/viewFlipper2"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:id="#+id/innerone"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#00ff00"
android:orientation="vertical" >
<TextView
android:id="#+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="LAYOUT 2-1"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
<LinearLayout
android:id="#+id/innertwo"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#00ff00"
android:orientation="vertical" >
<TextView
android:id="#+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="LAYOUT 2-2"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
<LinearLayout
android:id="#+id/innerthree"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#00ff00"
android:orientation="vertical" >
<TextView
android:id="#+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="LAYOUT 2-3"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
</ViewFlipper>
</ViewFlipper>
</LinearLayout>
The animations:
flipinnext.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="#android:anim/decelerate_interpolator" >
<translate
android:duration="500"
android:fromXDelta="-100%"
android:toXDelta="0%" />
</set>
flipinprevious.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="#android:anim/decelerate_interpolator" >
<translate
android:duration="500"
android:fromXDelta="100%"
android:toXDelta="0%" />
</set>
flipoutnext.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="#android:anim/decelerate_interpolator" >
<translate
android:duration="500"
android:fromXDelta="0%"
android:toXDelta="100%" />
</set>
flipoutprevious.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="#android:anim/decelerate_interpolator" >
<translate
android:duration="500"
android:fromXDelta="0%"
android:toXDelta="-100%" />
</set>
And then you need a set of almost identical animations for the root flip (y-axis). Just copy the x-axis animations and change the translate attributes to the Y-axis.

Launch market place with id of an application that doesn't exist in the android market place

I am creating an application that checks the installation of a package and then launches the market-place with its id.
When I try to launch market place with id of an application say com.mybrowser.android by throwing an intent android.intent.action.VIEW with url: market://details?id=com.mybrowser.android, the market place application does launches but crashes after launch.
Note: the application com.mybrowser.android doesn't exists in the market-place.
MyApplication is my application.
$ adb logcat
I/ActivityManager( 1030): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=myapp.testapp/.MyApplication }
I/ActivityManager( 1030): Start proc myapp.testapp for activity myapp.testapp/.MyApplication: pid=3858 uid=10047 gids={1015, 3003}
I/MyApplication( 3858): [ Activity CREATED ]
I/MyApplication( 3858): [ Activity STARTED ]
I/MyApplication( 3858): onResume
D/dalvikvm( 1109): GC freed 6571 objects / 423480 bytes in 73ms
I/MyApplication( 3858): Pressed OK button
I/MyApplication( 3858): Broadcasting Intent: android.intent.action.VIEW, data: market://details?id=com.mybrowser.android
I/ActivityManager( 1030): Starting activity: Intent { act=android.intent.action.VIEW dat=market://details?id=com.mybrowser.android flg=0x10000000 cmp=com.android.ven
ding/.AssetInfoActivity }
I/MyApplication( 3858): onPause
I/ActivityManager( 1030): Start proc com.android.vending for activity com.android.vending/.AssetInfoActivity: pid=3865 uid=10023 gids={3003}
I/ActivityThread( 3865): Publishing provider com.android.vending.SuggestionsProvider: com.android.vending.SuggestionsProvider
D/dalvikvm( 1030): GREF has increased to 701
I/vending ( 3865): com.android.vending.api.RadioHttpClient$1.handleMessage(): Handle DATA_STATE_CHANGED event: NetworkInfo: type: WIFI[], state: CONNECTED/CO
NNECTED, reason: (unspecified), extra: (none), roaming: false, failover: false, isAvailable: true
I/ActivityManager( 1030): Displayed activity com.android.vending/.AssetInfoActivity: 609 ms (total 7678 ms)
D/dalvikvm( 1030): GC freed 10458 objects / 676440 bytes in 128ms
I/MyApplication( 3858): [ Activity STOPPED ]
D/dalvikvm( 3865): GC freed 3538 objects / 254008 bytes in 84ms
W/dalvikvm( 3865): threadid=19: thread exiting with uncaught exception (group=0x4001b180)
E/AndroidRuntime( 3865): Uncaught handler: thread AsyncTask #1 exiting due to uncaught exception
E/AndroidRuntime( 3865): java.lang.RuntimeException: An error occured while executing doInBackground()
E/AndroidRuntime( 3865): at android.os.AsyncTask$3.done(AsyncTask.java:200)
E/AndroidRuntime( 3865): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
E/AndroidRuntime( 3865): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
E/AndroidRuntime( 3865): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
E/AndroidRuntime( 3865): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
E/AndroidRuntime( 3865): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
E/AndroidRuntime( 3865): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
E/AndroidRuntime( 3865): at java.lang.Thread.run(Thread.java:1096)
E/AndroidRuntime( 3865): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 3865): at com.android.vending.AssetItemAdapter$ReloadLocalAssetInformationTask.doInBackground(AssetItemAdapter.java:845)
E/AndroidRuntime( 3865): at com.android.vending.AssetItemAdapter$ReloadLocalAssetInformationTask.doInBackground(AssetItemAdapter.java:831)
E/AndroidRuntime( 3865): at android.os.AsyncTask$2.call(AsyncTask.java:185)
E/AndroidRuntime( 3865): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
E/AndroidRuntime( 3865): ... 4 more
I/Process ( 1030): Sending signal. PID: 3865 SIG: 3
I/dalvikvm( 3865): threadid=7: reacting to signal 3
I/dalvikvm( 3865): Wrote stack trace to '/data/anr/traces.txt'
I/DumpStateReceiver( 1030): Added state dump to 1 crashes
D/AndroidRuntime( 3865): Shutting down VM
W/dalvikvm( 3865): threadid=3: thread exiting with uncaught exception (group=0x4001b180)
E/AndroidRuntime( 3865): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 3865): java.lang.NullPointerException
E/AndroidRuntime( 3865): at com.android.vending.controller.AssetInfoActivityController.getIdDeferToLocal(AssetInfoActivityController.java:637)
E/AndroidRuntime( 3865): at com.android.vending.AssetInfoActivity.displayAssetInfo(AssetInfoActivity.java:556)
E/AndroidRuntime( 3865): at com.android.vending.AssetInfoActivity.access$800(AssetInfoActivity.java:74)
E/AndroidRuntime( 3865): at com.android.vending.AssetInfoActivity$LoadAssetInfoAction$1.run(AssetInfoActivity.java:917)
E/AndroidRuntime( 3865): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 3865): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 3865): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 3865): at android.app.ActivityThread.main(ActivityThread.java:4363)
E/AndroidRuntime( 3865): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 3865): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 3865): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 3865): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime( 3865): at dalvik.system.NativeStart.main(Native Method)
I/Process ( 1030): Sending signal. PID: 3865 SIG: 3
W/ActivityManager( 1030): Process com.android.vending has crashed too many times: killing!
D/ActivityManager( 1030): Force finishing activity com.android.vending/.AssetInfoActivity
I/dalvikvm( 3865): threadid=7: reacting to signal 3
D/ActivityManager( 1030): Force removing process ProcessRecord{44e48548 3865:com.android.vending/10023} (com.android.vending/10023)
However, when I try to launch the market place for a package that exists in the market place say com.opera.mini.android, everything works. Log for this case:
D/dalvikvm( 966): GC freed 2781 objects / 195056 bytes in 99ms
I/MyApplication( 1165): Pressed OK button
I/MyApplication( 1165): Broadcasting Intent: android.intent.action.VIEW, data: market://details?id=com.opera.mini.android
I/ActivityManager( 78): Starting activity: Intent { act=android.intent.action.VIEW dat=market://details?id=com.opera.mini.android flg=0x10000000 cmp=com.android.vending/.AssetInfoActivity }
I/AndroidRuntime( 1165): AndroidRuntime onExit calling exit(0)
I/WindowManager( 78): WIN DEATH: Window{44c72308 myapp.testapp/myapp.testapp.MyApplication paused=true}
I/ActivityManager( 78): Process myapp.testapp (pid 1165) has died.
I/WindowManager( 78): WIN DEATH: Window{44c72958 myapp.testapp/myapp.testapp.MyApplication paused=false}
D/dalvikvm( 78): GC freed 31778 objects / 1796368 bytes in 142ms
I/ActivityManager( 78): Displayed activity com.android.vending/.AssetInfoActivity: 214 ms (total 22866 ms)
W/KeyCharacterMap( 978): No keyboard for id 65540
W/KeyCharacterMap( 978): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
V/RenderScript_jni( 966): surfaceCreated
V/RenderScript_jni( 966): surfaceChanged
V/RenderScript( 966): setSurface 480 762 0x573430
D/ViewFlipper( 966): updateRunning() mVisible=true, mStarted=true, mUserPresent=true, mRunning=true
D/dalvikvm( 978): GC freed 10065 objects / 624440 bytes in 95ms
Any ideas?
I am having similar problem when trying to open a detail page in Market app using "market://details?id=pname:org.rabold.android.puzzleblox" URL from an application.
I can create a shortcut using AnyCut like this:
action: android.intent.action.VIEW
data: market://details?id=pname:org.rabold.android.puzzleblox
type:
then it works fine.
However, if I create an Android application with a button to launch Market with the same Uri as above, then I get an error in Market app like this: "Attention: A server error has occurred. Retry, or cancel and return to the previous screen."
The code of my button's listener looks like this:
okButton = (Button) findViewById(R.id.okButton);
okButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("market://details?id=pname:org.rabold.android.puzzleblox"));
//Uri.parse("market://search?q=pname:org.rabold.android.puzzleblox"));
startActivity(intent);
}
});
Note in the above code, if I use 'search' instead of 'details' then it works. I'd like to use 'details' instead of 'search' because I know that my app will be available on Market when it's done. Thanks.
Update!:
Do not use "pname:"
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=com.example.android"));
startActivity(intent);
Works perfectly.
per:
http://developer.android.com/distribute/googleplay/promote/linking.html#android-app
☮ ♥ ☺
thnx Daniel, I can confirm that your solution is working fine on device.
#TPham: please try with correct url (append id only),
passing correct id also working fine, see example below;
static final String APP_MARKET_URL = "market://details?id=com.wareninja.android.fotolicke";
Intent intent = new Intent( Intent.ACTION_VIEW,
Uri.parse(APP_MARKET_URL));
startActivity(intent);
instead of launching with the exact ID, you can try doing it by searching by the package.
Intent intent = new Intent( Intent.ACTION_VIEW,
Uri.parse("market://search?q=pname:com.package.package2.package3"));
startActivity(intent);

Categories

Resources