The app runs in emulator but does not run on an actual device

jpark1205jpark1205 Member ✭✭

So I am working on an app where it has a login page and user will be able to login and upload the documents. The database is connected using remotely. It works on the android emulator but when run it on my android phone (Samsung Note 8) it shows the login page but it wont go to the next page (where user can upload the documents). I have doing it over week now.. PLEASE HELP!!!
THANK YOU!!!

Best Answers

  • jpark1205jpark1205 ✭✭
    Accepted Answer

    @AlbertK said:
    Is your emulator and your phone on the same network? if not then it is a network issue.

    THANK YOU SO MUCH!!! IT WORKS NOW!!! I really did not think of that.

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai

    1.Will the problem occur on all actual devices? Try deploying code on other devices.

    2.Check the Supported Architectures in Visual Studio.
    Properties -> Android Options -> Advanced ->Supported Architectures

    Refer to:
    https://forums.xamarin.com/discussion/98764/app-works-on-emulator-but-not-on-device

  • AlbertKAlbertK MYMember ✭✭✭

    How are you connecting to the database ? If you are using connection string method then you are asking for trouble. Imagine doing that across the internet on mobile, firewall port mapping, latency issues, losing connection with DB and what not, security issues. it would be a no go. Direct DB connection are not meant for high latency and unreliable network.

    You have to code a web api for your mobile to connect to the DB.

  • jpark1205jpark1205 Member ✭✭
    edited August 14

    Thank you!

  • jpark1205jpark1205 Member ✭✭

    @AlbertK said:
    How are you connecting to the database ? If you are using connection string method then you are asking for trouble. Imagine doing that across the internet on mobile, firewall port mapping, latency issues, losing connection with DB and what not, security issues. it would be a no go. Direct DB connection are not meant for high latency and unreliable network.

    You have to code a web api for your mobile to connect to the DB.

    Thank you!! I will try if for sure

  • jpark1205jpark1205 Member ✭✭

    @Jarvan said:
    1.Will the problem occur on all actual devices? Try deploying code on other devices.

    2.Check the Supported Architectures in Visual Studio.
    Properties -> Android Options -> Advanced ->Supported Architectures

    Thank You for you reply!! I will take a look!

  • jpark1205jpark1205 Member ✭✭

    @AlbertK said:
    How are you connecting to the database ? If you are using connection string method then you are asking for trouble. Imagine doing that across the internet on mobile, firewall port mapping, latency issues, losing connection with DB and what not, security issues. it would be a no go. Direct DB connection are not meant for high latency and unreliable network.

    You have to code a web api for your mobile to connect to the DB.

    Actually albert, i connect my database using node.js so it is not direct connection. It just so weird when i can login and register on my emulator but not being able to login and register on my device. So when i try to login and register it would do nothing...

  • jpark1205jpark1205 Member ✭✭
    Accepted Answer

    @AlbertK said:
    Is your emulator and your phone on the same network? if not then it is a network issue.

    THANK YOU SO MUCH!!! IT WORKS NOW!!! I really did not think of that.

Sign In or Register to comment.