NativeDialogs icon indicating copy to clipboard operation
NativeDialogs copied to clipboard

NativeListDialog on Android 2.3

Open xmedia-nl opened this issue 12 years ago • 6 comments

Hi,

I'm having issues on using the native list dialog on Android 2.3. I have it working on other (newer) Android versions, but on 2.3 it doesn't do anything.

It doesn't throw an error and it doesn't open the dialog either. NativeListDialog.isSupported returns true though, so my code assumes it will work.

I have tried using different Themes, or not providing any theme at all, but that doens't make a difference

xmedia-nl avatar Feb 25 '13 14:02 xmedia-nl

I have just tested it on android 2.3 an it works perfectly fine. Anyone else had this problem? Maybe send me the code You are using.

mateuszmackowiak avatar Feb 28 '13 21:02 mateuszmackowiak

That's strange. I've made a test app which works on my Galaxy Note 2 and on my HTC One V, but not on my HTC Desire (1st gen).

You can find the .apk and the .fla with the code on the following link; https://dl.dropbox.com/u/29030016/nativeListTest.zip

xmedia-nl avatar Mar 01 '13 08:03 xmedia-nl

I have tested Your app and it works fine. Used android 2.3. There are no differences between the api so there should be no problem. Try downloading the Android sdk and use "androidSDK/platform-tools/adb logcat" to pin to the android logs of the device. If something goes wrong there should be some output.

mateuszmackowiak avatar Mar 03 '13 22:03 mateuszmackowiak

Alright, I finally found time to test it again and read the logs. I did find something that could clear this issue up:

I/NativeAlert( 1200): initialize I/NativeAlert( 1200): createContext I/ListDialogContext( 1200): getFunctions I/dalvikvm( 1200): Could not find method java.lang.String.isEmpty, referenced from method pl.mateuszmackowiak.nativeANE.NativeDialog.listDialog.showListDialog.createPopup W/dalvikvm( 1200): VFY: unable to resolve virtual method 2361: Ljava/lang/String;.isEmpty ()Z D/dalvikvm( 1200): VFY: replacing opcode 0x6e at 0x0012 I/dalvikvm( 1200): Could not find method android.app.AlertDialog$Builder., referenced from method pl.mateuszmackowiak.nativeANE.NativeDialog.listDialog.showListDialog.createPopup W/dalvikvm( 1200): VFY: unable to resolve direct method 189: Landroid/app/AlertDialog$Builder;. (Landroid/content/Context;I)V D/dalvikvm( 1200): VFY: replacing opcode 0x70 at 0x0078 D/dalvikvm( 1200): VFY: dead code 0x0015-001e in Lpl/mateuszmackowiak/nativeANE/NativeDialog/listDialog/showListDialog;.createPopup (Lcom/adobe/fre/FREContext;Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/CharSequence;[ZLjava/lang/Integer;ZI)Landroid/app/AlertDialog; D/dalvikvm( 1200): VFY: dead code 0x007b-007c in Lpl/mateuszmackowiak/nativeANE/NativeDialog/listDialog/showListDialog;.createPopup (Lcom/adobe/fre/FREContext;Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/CharSequence;[ZLjava/lang/Integer;ZI)Landroid/app/AlertDialog;

Edit: Oh, and this should help too.. Turns out it's android 2.2.2 (Froyo) Sorry about the mixup!

xmedia-nl avatar Mar 12 '13 18:03 xmedia-nl

Seems to be the issue I came across, I managed to get it working by rebuilding the ane using a different ant script. Bug report here: https://github.com/mateuszmackowiak/NativeDialogs/issues/20

mattmurton avatar Jun 06 '13 16:06 mattmurton

See my comment on the above linked issue report for a working version.

mattmurton avatar Jun 12 '13 14:06 mattmurton