B4A Question B4A v8.00 StartServiceAt / StartServiceAtExact / SetExactAndAllowWhileIdle - Pendrush    
Mar 19, 2018Do we still need this code in B4A 8.00+:
Sub SetExactAndAllowWhileIdle (Time As Long, ServiceName As String)
Dim p As Phone
If p.SdkVersion < 23 Then
StartServiceAtExact(ServiceName, Time, True)
Else
Dim intex As Intent
intex.Initialize("", "..., Array(0, Time, pi))
End If
End Sub
or StartServiceAtExact(ServiceName, Time, True) will do...
link: Do we still need this code in B4A 8.00+:
No.
or StartServiceAtExact(ServiceName, Time, True...
B4A Question StartServiceAtExact / Receiver or Service ? - Magma    
Oct 27, 2025/#content
(in the example, Erel using StartServiceAtExact with a receiver, i imagine - that if need to do a job at the exact time will add something in receiver code)
but as i understand StartServiceAtExact...
link:
I used: RestDurationMillis = 1 * 60 * 1000 (1 min)
Android does not allow such short time. You sho...
link: @vinpolins ...hmm also the version of IDE - i think is very old...
I am using B4A 13.40 / android-3...
link: Seems you ve changed messages of logs and added calling a sub...
Also... for working with schedule ...
B4A Question [Solved] StartServiceAtExact fails in my project - asales    
Oct 27, 2022))
CancelScheduledService(Alarme)
'StartServiceAt(Alarme,t,True)
StartServiceAtExact(Me,t,True)
If I change the StartServiceAt to StartServiceAtExact, I get this error below when the app starts.
If I use...(Common.java:947)
at anywheresoftware.b4a.keywords.Common.StartServiceAtExact(Common.java:938...
link: code:
StartServiceAtExact(Alarme,t,True)...
link: Based on the error message, you are passing an activity instead of a service....
Italian StartServiceAtExact non sbaglia mai - sirjo66    
May 24, 2022 provare ad utilizzare (al posto di StartServiceAt) il famoso StartServiceAtExact, ed ho risolto il...
link:
Come base hai usato l'esempio del Background Location?
Si...
link: Come base hai usato l'esempio del Background Location?...
link: di troppo.
Con StartServiceAtExact non sbaglia nemmeno di un secondo ma mi succhia la batteria...
Other B4A v11.50 has been released! - Erel    
Mar 21, 2022   
(51 reactions) the B4J sending code:
m.Put("priority", 10)
- StartServiceAt / StartServiceAtExact: You need to use StartServiceAtExact and add this "non-dangerous" permission:
AddPermission(android.permission.SCHEDULE_EXACT_ALARM)
... it is no longer possible to start services in the background. One of the consequences of this restriction...'t always work.
Starting from v11.50 the optimized dexer was removed and B4A uses Google's D8...
B4A Code Snippet Start receiver at exact time - Erel    
May 28, 2023   
(19 reactions))
If HasPermission Then
StartServiceAtExact(ScheduledReceiver, DateTime.Now + 10 * DateTime.TicksPerSecond, True) 'yes it is StartServiceAtExact and we pass a receiver
Else
Log....REQUEST_SCHEDULE_EXACT_ALARM", "package:" & Application.PackageName)
StartActivityForResult(in...("getSystemService", Array("alarm"))
End Sub
Sub StartActivityForResult(i As Intent)
Dim jo...
link: That code gives you the next time that you need to pass to StartServiceAtExact....
B4A Question StartServiceAtExact - Cristian Achim (first post)    
May 26, 2024
Hi,
Can I set a service to run with StartServiceAtExact to every 20 minutes. Something like StartServiceAtExact(Me, TimeToRun, True) and how can I do this?
I tried to verify on three devices and...
link: First step is to switch to receivers: Receivers and Services in 2023+
Android will not let your...
link: On Android 8 (Samsung Galaxy A6) And Android 12 (Samsung Galaxy S10+) it does not work, work only in...
link:
I will try. Thank you!
It seems to work. The problem was from a some piece of code that has genera...
B4A Question startserviceatexact not workin as expected - jayel    
Aug 16, 2018Hello,
my boss want to know if there is internet connection with my app, so he is sure that al the notifications will be send to the phone.
I implemented a service called "checkinternet"...
link: (Result As Boolean)
StartServiceAtExact("",DateTime.Now + 30*1000,True)
Service...
link: (httputils2service) Destroy **
Checkinternet timer started
java.lang.RuntimeException: java.lang...
link: The minimum period for StartServiceAt is 30 minutes. Android will not allow you to start your app...
B4A Question StartServiceAtExact vs StartServiceAt - PhilipBrown    
Jun 16, 2015I'm not clear on the difference between StartServiceAtExact and StartServiceAt.
If StartServiceAt does not start at the exact time given, then when does it start?...
link: StartServiceAtExact is introduced in B4A 5.0
Which Version of B4A you are using?...
link: I am trying to use this code:
StartServiceAtExact(svcDownload, Datetime.now + X ,True...
link: You mean we can startserviceatexact on old android version?for example android 2.3?
Yes and Yes....
B4A Question StartServiceAtExact can't read data stored - Erel (first post)    
Jan 12, 2021Still not enough information.
Start a new thread and post the question properly....
link: Thanks Kmatle.
File exists, if open app this launch correct Notification, but in the service...
link:
but i try read data stored with File.ReadMap the service can't acces info.
So the file...
link: Thanks
Sorry, i start service with ServiceStartAtExact.
service start OK.
but i try read data...
Page: 1  
2  
3  
4  
5  
6  
7