Connecting Android application to BlueMix stored DB2 Database - android

How can I connect an Android application to a DB2 database stored in BlueMix?
I know that some Java libraries are missing in Android, so I can't use JDBC to connect to the database.
Any Idea?

You can not talk directly to the SQL DB on Bluemix from your android app. You will need to create an intermediary application on bluemix that talks to the db and your android app can talk to that application. You can implement this backend as a RESTful API (Java JAX-RS, Node.js w/ Express etc). The Boilerplates on Bluemix are a good place to start.
There is also the Mobile Data framework on Bluemix that simplifies this by setting up all the mobile backend for you.

Related

Can android access a PostgreSQL database from a traditional web application?

I am fairly new to databases, and StackOverflow(so bare with my question). My friends and I are trying to create a "student" version android app of a current school website. We just want to create something that is mobile friendly and easy to use for the students. However, the current website is a traditional web application (not REST API + SPA) and uses PostgreSQL as its database. I am wondering if we can connect a mobile app to that database to access the student's data or if we have to create a separate database.
You can use the same database but you need to create a backend service (REST API o Web Service) to comunicate the device and the database. You can use technologies like Nodejs, Go.
Hope this help you

Xamarin Android with Azure SQL Database and SignalR

I am building a chat app for my University library, and have run into some hurdles. The technologies I am using are Xamarin Android and Microsoft Azure. The issue I have is that I don't know how to connect my Xamarin Android app to my Azure SQL database. I need the database for a couple of reasons:
1) Authenticating my users to ensure only our University students can log in.
2) For the list of topics that the library may wish to put up for the students.
I will also be needing to use SignalR for the chat capabilities.
Now on Azure I have created a Web+Mobile app, which has given me a URL for the app, and I have created an SQL database, which has given me connection info for the database.
How do I connect my mobile app to the database, so I can perform my CRUD operations? I have gone through the documentation on Xamarin like "Consuming a RESTful web service" but unfortunately am still needing to find the solution.
Thanks and Regards,
Aditya Johar
How do I connect my mobile app to the database, so I can perform my CRUD operations?
You could create a Web API for validating login users and CRUD operations, and you could use ADO.NET objects (SqlConnection, SqlCommand etc) or Entity Framework to work with your Azure SQL database. And then you could use HttpClient to send request to Web API to validate login user and do CRUD operations from Xamarin Android app.
Example: CRUD ASP.NET Web API With Entity Framework
Xamarin Android: Create Login With WEB API Using Azure SQL Server
I will also be needing to use SignalR for the chat capabilities.
You need to create hub class and define hub methods that clients can call, and then you could start the hub connection and invoke methods on the hub server in your Xamarin Client. The following articles would be helpful.
ASP.NET SignalR Xamarin Client
ASP.NET SignalR

How to connect mobile application with website database (mysql google cloud)

I want to develop a mobile application (android app) for my company web application. So , it will use the same database with the web database. My company use mysql google cloud. How can i connect my mobile application with the database ?
Actually ran into the same scenario recently. What i did was went ahead and looked into how to specifically connect your android application to phpmyadmin, which is a database that can connect android to your web sites database. Not sure who your web host is but i have a site that is hosted by Hostgator and they implement phpmyadmin in order for the webmaster to go ahead and handle the database. For more info i have posted this link which will guide you on the proper steps to take to connect phpmyadmin to your android application.
https://www.youtube.com/playlist?list=PL0_XE0UFeWvaY5NeFcFaGmEFJmJGhnims
Hope this helps. :)
Create api interface in backend (php, etc...) through web to access database.
Use httpconnection to connect web interface and upload/download data by parameters.

Can I connect a database to android app using Apache instead of Redis Sever if I already have a .sql database?

I'm trying to run this android restaurant project from github: https://github.com/gaodayue/RESTaurant_android
and the frontend and backend for the project requires Node.js, Redis and MySQL: https://github.com/gaodayue/RESTaurant_backend
I'm not familiar with Redis or Node.js at all, so how do I access and connect the databases stored in the ddl.sql file to app in some other way? Is it possible with an Apache Server?
well, i think you are using REST service, if you want to use that from apache server, you have to create a REST API for apache, can be made in PHP for example

Xamarin.Android Application Connecting to SQL Database

I am looking to create a simple xamarin.android mobile application which can connect to and interact with an SQL database hosted in azure. What would be the best way to create this connection? I have been able to create a simple console application which can do this if that helps, but am unable to do a similar thing with an android app. Thanks
You can try Azure App Service Mobile Apps to work with an SQL database hosted in Azure in your app.
Have a look at these samples from Xamarin. The "MyShoope" App in particular uses data storage.
I have provided my existing .NET Backend for reference on how to create your controllers and data entities to publish to Azure. Read through the Azure Mobile Apps tutorial to learn how to create and setup your own Mobile Apps backend for My Shoppe. https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-xamarin-forms-get-started/

Categories

Resources