Clean beacon test
This commit is contained in:
parent
af954f8a6c
commit
c02b4b8a1e
@ -165,10 +165,10 @@ class _BodyState extends State<Body> {
|
|||||||
{
|
{
|
||||||
// ONLINE
|
// ONLINE
|
||||||
List<SectionDTO>? sectionsDownloaded = await ApiService.getAllSections(appContext.clientAPI, visitAppContext.configuration!.id!);
|
List<SectionDTO>? sectionsDownloaded = await ApiService.getAllSections(appContext.clientAPI, visitAppContext.configuration!.id!);
|
||||||
print(sectionsDownloaded);
|
//print(sectionsDownloaded);
|
||||||
if(sectionsDownloaded!.isNotEmpty) {
|
if(sectionsDownloaded!.isNotEmpty) {
|
||||||
sections = sectionsDownloaded.where((s) => s.type == SectionType.Article || s.type == SectionType.Quizz).toList(); // TODO Support more than Article and Quizz section type
|
sections = sectionsDownloaded.where((s) => s.type == SectionType.Article || s.type == SectionType.Quizz).toList(); // TODO Support more than Article and Quizz section type
|
||||||
print(sections);
|
//print(sections);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -55,32 +55,17 @@ class _VisitPageState extends State<VisitPage> with WidgetsBindingObserver {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
WidgetsBinding.instance.addObserver(this);
|
WidgetsBinding.instance.addObserver(this);
|
||||||
NumberFormat formatter = NumberFormat("000");
|
|
||||||
|
|
||||||
for(var i = 100; i >= 1; i--) {
|
if (Platform.isIOS) {
|
||||||
Region region = Region(
|
|
||||||
identifier: "MyMuseumB${formatter.format(i)}",
|
|
||||||
proximityUUID: 'FDA50693-A4E2-4FB1-AFCF-C6EB07647825'
|
|
||||||
);
|
|
||||||
regions.add(region);
|
|
||||||
print("Add region named ${region.identifier}");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*if (Platform.isIOS) {
|
|
||||||
// iOS platform, at least set identifier and proximityUUID for region scanning
|
// iOS platform, at least set identifier and proximityUUID for region scanning
|
||||||
/*regions.add(Region(
|
|
||||||
identifier: 'MyMuseumB',
|
|
||||||
proximityUUID: '01122334-4556-6778-899A-ABBCCDDEEFF0'));*/
|
|
||||||
for(var i = 100; i >= 1; i--) {
|
|
||||||
regions.add(Region(
|
regions.add(Region(
|
||||||
identifier: 'MyMuseumB'+i.toString(),
|
identifier: 'MyMuseumB',
|
||||||
proximityUUID: 'FDA50693-A4E2-4FB1-AFCF-C6EB07647825')
|
proximityUUID: 'FDA50693-A4E2-4FB1-AFCF-C6EB07647825')
|
||||||
);
|
);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// Android platform, it can ranging out of beacon that filter all of Proximity UUID
|
// Android platform, it can ranging out of beacon that filter all of Proximity UUID
|
||||||
regions.add(Region(identifier: 'MyMuseumB'));
|
regions.add(Region(identifier: 'MyMuseumB'));
|
||||||
}*/
|
}
|
||||||
|
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user