Log in or register to post comments

Android Native Extension ( AIR )

April 1, 2014 - 7:21am #1

Hi all ! 

 

I'm currently developing native extension for AIR which is using Vuforia ( actually for both iOS and Android ). Extension builded for iOS is working well  ( but during developmend I had also some taugh issues ). Unfortunately Android version written in Java and based on yours excellent examples doesn't perform well. The problem occurs while initing Vuforia. Straightforward ,Vuforia is initing for over 3 minutes! Comparing - native version is starting 10 - 12 secounds. While starting I'm getting somethink like that  ( in LogCat ) : 

 

<pre class="brush:plain">

04-01 16:02:46.861: I/ActivityManager(1486): Starting: Intent { cmp=air.com.le.app/com.qualcomm.vuforia.samples.VuforiaSamples.app.ImageTargets.ImageTargets } from pid 3228
04-01 16:02:46.892: D/PhoneWindow(3228): couldn't save which view has focus because the focused view com.adobe.air.AIRWindowSurfaceView@40556dc8 has no id.
04-01 16:02:46.900: E/SensorManager(3228): unregisterListener:: all sensors,  listener = android.view.OrientationEventListener$SensorEventListenerImpl@40576310
04-01 16:02:46.978: D/dalvikvm(3228): GC_CONCURRENT freed 1144K, 54% free 3131K/6663K, external 1596K/2108K, paused 3ms+3ms
04-01 16:02:46.986: W/ActivityManager(1486): Trying to launch air.com.le.app/com.qualcomm.vuforia.samples.VuforiaSamples.app.ImageTargets.ImageTargets
04-01 16:02:47.001: D/ImageTargets(3228): onCreate
04-01 16:02:47.017: I/Vuforia_Sample_Applications(3228): Activity is in PORTRAIT
04-01 16:02:47.017: D/ImageTargets(3228): onResume
04-01 16:02:47.025: D/dalvikvm(3228): Trying to load lib /data/data/air.com.le.app/lib/libVuforia.so 0x40512760
04-01 16:02:47.033: D/dalvikvm(3228): Added shared lib /data/data/air.com.le.app/lib/libVuforia.so 0x40512760
04-01 16:02:47.056: I/System.out(3228): IllegalArgumentExceptionIllegalArgumentExceptionIllegalArgumentExceptionIllegalArgumentExceptionIllegalArgumentExceptionIllegalArgumentExceptionIllegalArgumentExceptionIllegalArgumentExceptionNative library libVuforia.so loaded
04-01 16:02:47.072: I/AR(3228): QCAR has been initialized successfully
04-01 16:02:47.072: I/AR(3228): QCAR SDK version 2.8.7
04-01 16:02:47.119: I/ActivityManager(1486): Displayed air.com.le.app/com.qualcomm.vuforia.samples.VuforiaSamples.app.ImageTargets.ImageTargets: +138ms
04-01 16:02:47.212: I/dalvikvm(3228): Total arena pages for JIT: 11
04-01 16:02:47.290: D/Vuforia_Sample_Applications(3228): InitVuforiaTask.onPostExecute: Vuforia initialization successful
04-01 16:02:47.447: I/ImageTargets(3228): Tracker successfully initialized
04-01 16:02:47.447: I/AR(3228): ImageTracker: Successfully created dataset
04-01 16:02:47.447: D/szipinf(3228): Initializing inflate state
04-01 16:02:47.447: D/szipinf(3228): Initializing zlib to inflate
04-01 16:02:47.494: D/szipinf(3228): Initializing inflate state
04-01 16:02:47.509: D/dalvikvm(3228): GC_FOR_MALLOC freed 198K, 54% free 3103K/6663K, external 1616K/2108K, paused 20ms
04-01 16:02:47.525: I/dalvikvm-heap(3228): Grow heap (frag case) to 14.124MB for 7524274-byte allocation
04-01 16:02:47.564: D/dalvikvm(3228): GC_FOR_MALLOC freed 15K, 26% free 10435K/14023K, external 1616K/2108K, paused 25ms
04-01 16:02:47.587: D/szipinf(3228): Initializing zlib to inflate
04-01 16:02:47.611: D/dalvikvm(3228): GC_CONCURRENT freed 2K, 26% free 10432K/14023K, external 1616K/2108K, paused 3ms+3ms
04-01 16:02:47.728: D/dalvikvm(3228): GC_FOR_MALLOC freed 7360K, 79% free 3078K/14023K, external 1616K/2108K, paused 19ms
04-01 16:02:47.736: I/dalvikvm-heap(3228): Grow heap (frag case) to 14.100MB for 7524018-byte allocation
04-01 16:02:47.767: D/dalvikvm(3228): GC_FOR_MALLOC freed 0K, 26% free 10425K/14023K, external 1616K/2108K, paused 19ms
04-01 16:02:47.845: D/dalvikvm(3228): GC_CONCURRENT freed <1K, 26% free 10425K/14023K, external 1616K/2108K, paused 2ms+2ms
04-01 16:02:48.915: E/wpa_supplicant(1630): in wpa_drv_driver_cmd
04-01 16:02:48.915: D/wpa_supplicant(1630): wpa_driver_tista_driver_cmd RSSI-APPROX
04-01 16:02:48.915: D/wpa_supplicant(1630): rssi command
04-01 16:02:48.915: D/wpa_supplicant(1630): wpa_driver_tista_private_send ioctl_cmd = 8000643  res = 0
04-01 16:02:48.915: D/wpa_supplicant(1630): wpa_driver_tista_private_send ioctl_cmd = 810a22  res = 0
04-01 16:02:48.915: E/wpa_supplicant(1630): wpa_driver_tista_get_rssi data -60 beacon -54 success
04-01 16:02:48.915: D/wpa_supplicant(1630): rssi_data -60 rssi_beacon -54
04-01 16:02:48.915: D/wpa_supplicant(1630): buf lukas rssi -54
04-01 16:02:48.923: E/wpa_supplicant(1630): in wpa_drv_driver_cmd
04-01 16:02:48.923: D/wpa_supplicant(1630): wpa_driver_tista_driver_cmd LINKSPEED
04-01 16:02:48.923: D/wpa_supplicant(1630): Link Speed command
04-01 16:02:48.923: D/wpa_supplicant(1630): buf LinkSpeed 54
04-01 16:02:49.205: W/PowerManagerService(1486): Timer 0x3->0x3|0x3
04-01 16:02:50.415: D/BatteryService(1486): update start
04-01 16:02:50.423: D/BatteryService(1486): updateBattery level:100 scale:100 status:2 health:2 present:true voltage: 4152 temperature: 260 technology: Li-ion AC powered:false USB powered:true icon:17302213
04-01 16:02:50.431: I/StatusBarPolicy(1556): BAT. S:2 H:2
04-01 16:02:50.431: D/BatteryService(1486): update start
04-01 16:02:50.439: D/BatteryService(1486): update start
04-01 16:02:51.923: E/wpa_supplicant(1630): in wpa_drv_driver_cmd
04-01 16:02:51.923: D/wpa_supplicant(1630): wpa_driver_tista_driver_cmd RSSI-APPROX
04-01 16:02:51.923: D/wpa_supplicant(1630): rssi command
04-01 16:02:51.923: D/wpa_supplicant(1630): wpa_driver_tista_private_send ioctl_cmd = 8000643  res = 0
04-01 16:02:51.931: D/wpa_supplicant(1630): wpa_driver_tista_private_send ioctl_cmd = 810a22  res = 0
04-01 16:02:51.931: E/wpa_supplicant(1630): wpa_driver_tista_get_rssi data -60 beacon -54 success
04-01 16:02:51.931: D/wpa_supplicant(1630): rssi_data -60 rssi_beacon -54
04-01 16:02:51.931: D/wpa_supplicant(1630): buf lukas rssi -54
04-01 16:02:51.931: E/wpa_supplicant(1630): in wpa_drv_driver_cmd
04-01 16:02:51.931: D/wpa_supplicant(1630): wpa_driver_tista_driver_cmd LINKSPEED
04-01 16:02:51.931: D/wpa_supplicant(1630): Link Speed command
04-01 16:02:51.931: D/wpa_supplicant(1630): buf LinkSpeed 54
04-01 16:02:53.134: D/szipinf(3228): Initializing inflate state
04-01 16:02:53.134: D/szipinf(3228): Initializing zlib to inflate
04-01 16:02:53.173: D/szipinf(3228): Initializing inflate state
04-01 16:02:53.173: D/szipinf(3228): Initializing zlib to inflate
04-01 16:02:53.212: D/szipinf(3228): Initializing inflate state
04-01 16:02:53.212: D/szipinf(3228): Initializing zlib to inflate
04-01 16:02:53.244: D/szipinf(3228): Initializing inflate state
04-01 16:02:53.244: D/szipinf(3228): Initializing zlib to inflate
04-01 16:02:53.283: D/szipinf(3228): Initializing inflate state
04-01 16:02:53.283: D/szipinf(3228): Initializing zlib to inflate
04-01 16:02:53.322: D/szipinf(3228): Initializing inflate state

</pre>

 

Logs " Initializing zlib to inflate" and "Initializing inflate state" are being dispatched over and over again every milisecound until extension dispatched this : 

 

<pre class="brush:plain">

04-01 16:05:32.322: D/Vuforia_Sample_Applications(3228): LoadTrackerTask.onPostExecute: execution successful
04-01 16:05:32.353: D/dalvikvm(3228): GC_EXPLICIT freed 343K, 80% free 3095K/14919K, external 1616K/2108K, paused 28ms
04-01 16:05:32.353: I/Vuforia_SampleGLView(3228): Using OpenGL ES 2.0
04-01 16:05:32.361: I/Vuforia_SampleGLView(3228): Using opaque GLView, depth buffer size: 16, stencil size: 0
04-01 16:05:32.369: I/GLThread(3228): noticed surfaceView surface lost tid=17
04-01 16:05:32.369: I/SecCameraHardwareInterface(1348): SecCameraHardwareInterface created: pid=1348, cameraId=0
 

</pre>

 

But as you probably see it's more than 3 minutes, which is hard to accept. I found that the problem lies in here : 

<pre class="brush:java">

dataset.load(path_to_ds,load_method)

</pre>

 

So my question is : Does anybody have any idea what may be wrong ?  Some I/O problem while loading DS ? Or rather problem with unziping DS ? Or maybe something else ? I would really appreciate for any piece of information which will help to solve out the problem. 

BTW. ANE was tested on a few Android mobile devices - everywhere the same situation.  

Thanks a lot for reading this ! 

Ahoy !

Android Native Extension ( AIR )

April 7, 2014 - 8:14am #5

Hi all ! 

 

I still can't solve the problem .. it is real pain in the ass. Does anybody know , why I'm getting such messages every milisecond while loading data sets ? 

 

<pre class="brush:plain">

04-01 16:02:53.134: D/szipinf(3228): Initializing inflate state
04-01 16:02:53.134: D/szipinf(3228): Initializing zlib to inflate
04-01 16:02:53.173: D/szipinf(3228): Initializing inflate state
04-01 16:02:53.173: D/szipinf(3228): Initializing zlib to inflate
04-01 16:02:53.212: D/szipinf(3228): Initializing inflate state
04-01 16:02:53.212: D/szipinf(3228): Initializing zlib to inflate
04-01 16:02:53.244: D/szipinf(3228): Initializing inflate state
04-01 16:02:53.244: D/szipinf(3228): Initializing zlib to inflate
04-01 16:02:53.283: D/szipinf(3228): Initializing inflate state
04-01 16:02:53.283: D/szipinf(3228): Initializing zlib to inflate
04-01 16:02:53.322: D/szipinf(3228): Initializing inflate state

</pre>

 

Guys , please help me a little , where should I look for a problem ?

 

Android Native Extension ( AIR )

April 1, 2014 - 12:34pm #4

that's fine. I hope someone can chime in on your subject.

 

Android Native Extension ( AIR )

April 1, 2014 - 12:01pm #3

Hello, 

 

AlessandroB , thanks for your clue. I know the thread, I was reading it a few times. Unfortunately my thread is different and has specific topic. I would like to keep up my question here, if you don't mind.  Mabye some Android Developer knows what may be the reason for such long initializing ( loading ) ? 

Thanks, Lukas.

Android Native Extension ( AIR )

April 1, 2014 - 7:53am #2

Hi, there is another thread discussing integration of AIR, so you might be interested in following up the discussion over there:

https://developer.vuforia.com/forum/android/vuforia-air-native-extension

 

Log in or register to post comments