I have just downloaded and compiled the CustomTileProvider example project from
post #416.
I updated the path to the Google Play Services library resources, choose my signing key and then installed it on my Moto G (kitkat).
It works as expected, finds no tiles as my Moto G has no cached tiles.
But as you can see from the log, the 'Get_Tile' method
is called:
You could try running your b4a project again, uncheck the 'Filter' checkbox in the b4a IDE and see if anything is logged that indicates what the problem is.
Or you could upload your project and i'll try it on my device.
By the way - what device are you running your project on?
Martin.
Thanks for the quick reply Martin. I've done the same with your #416 code simply changed the #AdditionalRes: to my Play Services res: e.g.,:
#AdditionalRes: C:\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms
And referenced my maps key in the manifest and have your package name as being allowed on the developer console credentials - this works for other code examples of yours so it should do so here. I've also ran successfully your example with urlTileProvider in post #53 of the google maps tutorials and it works fine. I've even tried with OSMDroid cached tiles in the same path as in your exact zip example for the custom provider above and the program program compiles and installs, zooms to the point in norfolk but no tiles show and the continuing issue is that the Get_Tile is still not called. My unfiltered log stops here:
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
MapFragment1_Ready
whereas the unfiltered log shows things I don't readily understand, here is a bit of it but I've uploaded the txt file of the unfiltered log as well. Do you know what the issue may be:
I am using B4A 4.30, Nexus 10 Android 5.1
>>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
CheckJNI is OFF
Couldn't load memtrack module (No such file or directory)
failed to load memtrack module: -2
Calling main entry com.android.commands.am.Am
START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=uk.co.martinpearman.b4a.googlemapdemo/.main} from uid 2000 on display 0
addAppToken: AppWindowToken{39330547 token=Token{35bfe886 ActivityRecord{38776561 u0 uk.co.martinpearman.b4a.googlemapdemo/.main t821}}} to stack=1 task=821 at 0
Adding window Window{24971b0c u0 Starting uk.co.martinpearman.b4a.googlemapdemo} at 6 of 12 (after Window{3212efb2 u0 com.winzip.android/com.winzip.android.activity.filebrowser.SDCardBrowser})
Shutting down VM
Start proc 28742:uk.co.martinpearman.b4a.googlemapdemo/u0a128 for activity uk.co.martinpearman.b4a.googlemapdemo/.main
Explicit concurrent mark sweep GC freed 704(30KB) AllocSpace objects, 0(0B) LOS objects, 39% free, 7MB/11MB, paused 203us total 14.682ms
Explicit concurrent mark sweep GC freed 7(240B) AllocSpace objects, 0(0B) LOS objects, 40% free, 7MB/11MB, paused 183us total 10.386ms
Explicit concurrent mark sweep GC freed 5(160B) AllocSpace objects, 0(0B) LOS objects, 40% free, 7MB/11MB, paused 282us total 11.832ms
Explicit concurrent mark sweep GC freed 20563(958KB) AllocSpace objects, 2(32KB) LOS objects, 26% free, 43MB/59MB, paused 1.019ms total 84.375ms
Use EGL_SWAP_BEHAVIOR_PRESERVED: true
Validating map...
Adding window Window{31fb16d3 u0 uk.co.martinpearman.b4a.googlemapdemo/uk.co.martinpearman.b4a.googlemapdemo.main} at 6 of 13 (before Window{24971b0c u0 Starting uk.co.martinpearman.b4a.googlemapdemo})
Initialized EGL, version 1.4
Enabling debug mode 0
new_window_surface returns 0x3000
Adding window Window{37196109 u0 uk.co.martinpearman.b4a.googlemapdemo/uk.co.martinpearman.b4a.googlemapdemo.main} at 7 of 14 (before Window{24971b0c u0 Starting uk.co.martinpearman.b4a.googlemapdemo})
Switching to real app window: Window{31fb16d3 u0 uk.co.martinpearman.b4a.googlemapdemo/uk.co.martinpearman.b4a.googlemapdemo.main}
new_window_surface returns 0x3000
No package identifier when getting value for resource number 0x00000000
Failure retrieving resources for com.winzip.android: Resource ID #0x0
Displayed uk.co.martinpearman.b4a.googlemapdemo/.main: +1s148ms (total +54s541ms)
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Making Creator dynamically
Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.
Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.
Google Play services client version: 7095000
Google Play services package version: 7099436
MapFragment1_Ready
Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@eaf2841 attribute=null, token = android.os.BinderProxy@1af658c2
Skipped 36 frames! The application may be doing too much work on its main thread.
new_window_surface returns 0x3000
java.lang.IllegalArgumentException: Wrong number of arguments; expected 4, got 3
java.lang.IllegalArgumentException: Wrong number of arguments; expected 4, got 3
java.lang.IllegalArgumentException: Wrong number of arguments; expected 4, got 3
java.lang.IllegalArgumentException: Wrong number of arguments; expected 4, got 3
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at uk.co.martinpearman.b4a.com.google.android.gms.maps.model.TileProviderImpl.getTile(TileProviderImpl.java:24)
at com.google.android.gms.maps.model.TileOverlayOptions$2.getTile(Unknown Source)
at com.google.android.gms.maps.model.internal.zzo$zza.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:380)
at com.google.android.gms.maps.model.internal.ag.a(SourceFile:96)
at com.google.android.gms.maps.model.u.a(SourceFile:75)
at com.google.maps.api.android.lib6.gmm6.c.am.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.lang.IllegalArgumentException: Wrong number of arguments; expected 4, got 3
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at uk.co.martinpearman.b4a.com.google.android.gms.maps.model.TileProviderImpl.getTile(TileProviderImpl.java:24)
at com.google.android.gms.maps.model.TileOverlayOptions$2.getTile(Unknown Source)
at com.google.android.gms.maps.model.internal.zzo$zza.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:380)
at com.google.android.gms.maps.model.internal.ag.a(SourceFile:96)
at com.google.android.gms.maps.model.u.a(SourceFile:75)
at com.google.maps.api.android.lib6.gmm6.c.am.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
at at at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
java.lang.IllegalArgumentException: Wrong number of arguments; expected 4, got 3
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at uk.co.martinpearman.b4a.com.google.android.gms.maps.model.TileProviderImpl.getTile(TileProviderImpl.java:24)
at com.google.android.gms.maps.model.TileOverlayOptions$2.getTile(Unknown Source)
at com.google.android.gms.maps.model.internal.zzo$zza.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:380)
at com.google.android.gms.maps.model.internal.ag.a(SourceFile:96)
at com.google.android.gms.maps.model.u.a(SourceFile:75)
at com.google.maps.api.android.lib6.gmm6.c.am.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)