cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
n1ko86
Regular Visitor

Android (mobile) app bug with component?

Hello All,

I have come across what seems to be a bug or inconsistency between the web designer runtime and Android app. The explanation of the working of my PowerApp follows.

My PowerApp uses a component footer:

powerapp_component.PNG

 

 

As can be seen it consists of four buttons. The component takes table input which allows control of the icon and some functionality such as selecting the offgrid barcode scanner button. The barcode scanner And five outputs, one is the value of the barcode scanner as text and the other four comprise of boolean values which change when a button is selected.

If(
    First(Parent.NavigationBinding).Button2.Selector="Barcode",
    Select(FooterScanner)
);
Set(varButton2Toggle, !varButton2Toggle)

Everything works fine within the component.

Part of the screen I am using for testing my functionality is shown below:

powerapp_screen.PNG

 

 

 

 

 

So when the camera icon is clicked the barcode scanner shows up in the mobile app (in the browser an error alert is raised and "Sample value" is returned), the boolean output for the camera button is assigned to the default property in the toggle control. When the boolean goes to true the toggle controls OnCheck property fires which runs the following code:

Set(BarcodeData, ContainerFooterMenu.ScannerOutput);
NewForm(ContainerForm);
Navigate(EditContainer, ScreenTransition.None);
Reset(ContainerFooterMenu) //The bug occurs even with the reset removed.

The BarcodeData variable is used to populate a cell in the ContainerForm if the form mode is New. This is where the bug occurs, on the web designer runtime the barcode value populates the form cell correctly first try.

But on Android it doesn't, but when i navigate back the to the first screen I can see the barcode data in the textbox I use for debugging and if i manually click the toggle control it takes me to a new form and now correctly populates the form cell.

I have tried removing the reset in the toggle code, using timers to add a delay to moving to the form.

Is this a bug or just how it is meant to work and perhaps it is the web designer runtime which is wrong? Any help or advice would be much appreciated.

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
n1ko86
Regular Visitor

Thanks Alex for the response.

Coincidentally I just worked out the problem and it wasn't a bug. My app was lagging causing a delay in the camera coming up, this helped me notice that the toggle was firing before the barcode scanner even loaded the camera. So the new form was loaded before a value was returned from the scanner. In the toggle control I changed the default property to not activate until a value is returned from the barcode scanner:

Default = If(Not(ContainerFooterMenu.ScannerOutput=""),ContainerFooterMenu.ToggleButton3)

 

View solution in original post

3 REPLIES 3
n1ko86
Regular Visitor

Apologies for bumping this thread, the bug still persists after trying different approaches or the proper method is still eluding me. Has anyone came across this before?

alrez
Community Support
Community Support

Hi,

 

Looking through your post here, it seems like your logic is fine. I don't see anything major that jumps out at me. This might be a better question to bring to the Microsoft Support Team. I'll include a link below; if you would like to go down that route. Otherwise maybe there is another communities member who might know what the issue is. 

 

If you would like to create a ticket with Microsoft Customer Support here is a link on how to do so: https://docs.microsoft.com/en-us/power-platform/admin/get-help-support

 

Regards,

 

Alex

 

-------

 

Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

n1ko86
Regular Visitor

Thanks Alex for the response.

Coincidentally I just worked out the problem and it wasn't a bug. My app was lagging causing a delay in the camera coming up, this helped me notice that the toggle was firing before the barcode scanner even loaded the camera. So the new form was loaded before a value was returned from the scanner. In the toggle control I changed the default property to not activate until a value is returned from the barcode scanner:

Default = If(Not(ContainerFooterMenu.ScannerOutput=""),ContainerFooterMenu.ToggleButton3)

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,583)