scriptBoris/NavigationSam

RequestPop not triggered on Android

tonyfonager opened this issue ยท 12 comments

I have now gotten you Nuget to work on the iOS version of my app.

While working on the Android version, I have issues getting the "RequestPop()" method to be triggered.

I have installed it on the Android native project, I have added the stuff in MainActivity.cs, but whenever I run the app nothing happens.

One thing I noticed, is that when I add the breakpoints only the first breakpoint in the constructor are marked "Red" when the page is active, but the next breakpoint is just the white circle with a little red border, normally I would think this signals that the breakpoint will never be hit ?

image

Its frustrating, and I cannot seem to figure out whats going on.

I have your Github project loaded too, and the sample app works on both iOS and Android - so it could be something I have done wrong, but as mentioned first I should have followed all instructions!

Here is my MainActivity.cs code :

image

And this line inside OnCreate :

image

I will deal with this problem in the near future.

Thanks, it might be an issue in my end, as it works in your sample but not in my app!

@tonyfonager for fun, can you clone the Sample Project and test the function RequestPop() there?

@tonyfonager for fun, can you clone the Sample Project and test the function RequestPop() there?

What do you mean ? I already have your Github project locally, and when running the sample it works on Android too ?

https://github.com/scriptBoris/NavigationSam.git - yeah, on Android worked.

Test project for Android is working. You need to clone it and check it out.
If catching the back button doesn't work, then the problem is in the library.
If intercepting the back button works, then the problem is in your project.

Sorry I didn't read your post above :)

If catching the back button doesn't work, then the problem is in the library.
If intercepting the back button works, then the problem is in your project.

There is a difference - your sample project uses the lib/source as a referenced project.

My project uses a Nuget.

Not sure if thats relevant, but its the only reason I have found so far.

I can try "copying" you test pages into my project, to see if it works there too ....

I have the same issues, when moving your test pages to my project. Its not triggered, and breakpoints inside the "RequestPop" function are white (not read) when class is loaded.

I now tried taking your sample project, removed the "NavigationSam" project and added references via Nuget instead.

Still works ... so the verdict must be that it for some reason does not work only in my project! Bummer!

@tonyfonager I found the problem. It will be fixed in the next version of the Nuget package. I apologize for not being able to test it accurately.

@tonyfonager nuget 1.0.3 is published. Can you try? It should work ๐Ÿ‘๐Ÿป