Importing Azure SQL to Android Studio
Why Stack Overflow recommends it
Stack Overflow users link it when answering questions about connecting an Android app to an Azure SQL database, since it shows the jTDS driver setup and connection URL changes that make the connection work.
Recommended by 2 people across 2 different months, 2019 to 2021.
What it is
A short 2017 screen-recorded walkthrough by Ryan McSweeny showing how to connect an Azure SQL database to an Android Studio project. It covers adding the jTDS JDBC driver jar and adjusting the connection URL to use it.
What people said
Recommends Kiva · 2019-06 · Stack Overflow · on “Android studio can't connect to database in Azure sql server”
I know this answer is waay too late, but I found this video that totally works: [this video] The thing is, you have to download a jtds jar, the guy in the video says where you can get it from and also, you need to add "jtds" before "sqlserver" in connection url and edit the way the 'databe' is written in the connection url, like this: jdbc: jtds :sqlserver://serverName.database.windows.net:portNr: DatabaseName =dbName;user=....
Recommends MoonLight · 2021-08 · Stack Overflow · on “How to connect sql azure with android app and sql server”
This is the answer to your step 2 If you don't want to use a brand new database and want to use your existing azure database then follow this link [this video] . This is a jtds method and I followed it and it worked for me. You will use your jdbc connection url that comes with your database instance on azure portal with minor changes in it which are explained in the link. Your portal profile password and username will also be used in the connection url so keep in mind hackers might get a peak to it if they examine your application apk.
Cites krishg · 2021-01 · Stack Overflow · on “Connect Azue SQL Database in Lnux Android Studio”
Because of the flavor of Java in Android, you would need jtds driver. Update your connection string to use jtds like below. Note the changes add "jtds" before "sqlserver" "DatabaseName" instead of "database" jdbc:jtds:sqlserver://sqlserver.database.windows.net:1433;DatabaseName=iwave_db_1;user=username@sqlserver;password=*******;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30; Also, make sure you enable required permissions in manifest to allow connection to internet. And also check firewall setting of your SQL Azure instance to allow traffic from the required IPs. Ref: [this video] NOTE: It's not a good design to directly connect to db from