Hi everyone,
I have a little problem with one of my apps that uses a notification.
My app is a three years old app and I used standard notifications with this code in a service module:
I was using Google Maps with no problem as described in this tutorial.
Recently I watched Erel's post for B4A 8.0 (I am using B4A 7.80) for the backward compatibility problem in new Androids in notifications. Searching the forum I found this tutorial for version safe notifications and I decided to use Erel's code. I added the Notification Builder library and changed my code as follows:
I added also the "#additionaljar: com.android.support:support-v4" in my Main activity and updated all the resources with B4A sdk Manager.
When I tried to compile I get this error:
B4A Version: 7.80
Parsing code. (0.03s)
Compiling code. (0.79s)
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code. (0.15s)
Organizing libraries. (1.59s)
Generating R file. (2.83s)
Compiling generated Java code. Error
B4A line: 411
gmap.AnimateCamera(cp)
javac 1.8.0_121
src\dhqi\besafe\android\settings.java:907: error: package com.google.android.gms.maps.model does not exist
mostCurrent._vvvvvvvvvvvv1.AnimateCamera((com.google.android.gms.maps.model.CameraPosition)(_cp.getObject()));
If I remove the reference #additionaljar: com.android.support:support-v4 and the Notification Builder library and change my code back to what it was everything works fine.
I also tried to add the reference #additionaljar: com.android.support:support-v4 without adding the Notification Builder library and without changing my code and even if I just add it I get the same error.
Any Ideas?
Thanks in advance
I have a little problem with one of my apps that uses a notification.
My app is a three years old app and I used standard notifications with this code in a service module:
B4X:
Dim nNotif As Notification
nNotif.Initialize
nNotif.Vibrate = True
nNotif.Icon = "icon"
nNotif.AutoCancel = False
nNotif.SetInfo("Notification", "The service started", Main)
nNotif.Notify(123)
Service.StartForeground(123, nNotif)
I was using Google Maps with no problem as described in this tutorial.
Recently I watched Erel's post for B4A 8.0 (I am using B4A 7.80) for the backward compatibility problem in new Androids in notifications. Searching the forum I found this tutorial for version safe notifications and I decided to use Erel's code. I added the Notification Builder library and changed my code as follows:
B4X:
Dim nNotif As Notification
nNotif.Initialize
nNotif = CreateNotification("Notification", "The service started", "icon", Main, True, True)
nNotif.Notify(123)
Service.StartForeground(123, nNotif)
I added also the "#additionaljar: com.android.support:support-v4" in my Main activity and updated all the resources with B4A sdk Manager.
When I tried to compile I get this error:
B4A Version: 7.80
Parsing code. (0.03s)
Compiling code. (0.79s)
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code. (0.15s)
Organizing libraries. (1.59s)
Generating R file. (2.83s)
Compiling generated Java code. Error
B4A line: 411
gmap.AnimateCamera(cp)
javac 1.8.0_121
src\dhqi\besafe\android\settings.java:907: error: package com.google.android.gms.maps.model does not exist
mostCurrent._vvvvvvvvvvvv1.AnimateCamera((com.google.android.gms.maps.model.CameraPosition)(_cp.getObject()));
If I remove the reference #additionaljar: com.android.support:support-v4 and the Notification Builder library and change my code back to what it was everything works fine.
I also tried to add the reference #additionaljar: com.android.support:support-v4 without adding the Notification Builder library and without changing my code and even if I just add it I get the same error.
Any Ideas?
Thanks in advance