K koffie Member Licensed User Longtime User Jul 14, 2020 #1 At the moment I am using https://www.b4x.com/android/forum/threads/ble-peripheral-as-ibeacon.105601/#post-662076 code to experiment with. B4X: jo.GetFieldJO("advertiser").RunMethod("startAdvertising", Array(AdvertiseSettingsBuilder.RunMethod("build", Null), _ AdvertiseData, Null, callback)) Works fine. What code do I have to run to "stopAdvertising" ? Every time i start advertising, android starts another instance without stopping previous instances and stops after 8 instances or so. I just want to start, stop and start a new instance.... Thanks,
At the moment I am using https://www.b4x.com/android/forum/threads/ble-peripheral-as-ibeacon.105601/#post-662076 code to experiment with. B4X: jo.GetFieldJO("advertiser").RunMethod("startAdvertising", Array(AdvertiseSettingsBuilder.RunMethod("build", Null), _ AdvertiseData, Null, callback)) Works fine. What code do I have to run to "stopAdvertising" ? Every time i start advertising, android starts another instance without stopping previous instances and stops after 8 instances or so. I just want to start, stop and start a new instance.... Thanks,
Erel B4X founder Staff member Licensed User Longtime User Jul 15, 2020 #2 Something like: B4X: jo.GetFieldJO("advertiser").RunMethod("stopAdvertising", Array(callback)) 'must be same callback that was used before Upvote 0
Something like: B4X: jo.GetFieldJO("advertiser").RunMethod("stopAdvertising", Array(callback)) 'must be same callback that was used before
K koffie Member Licensed User Longtime User Jul 15, 2020 #3 *head slap* it is an array *head slap* thanks Upvote 0