Realm for web development - android

I have been using a Realm for mobile development and now I am trying to build a website using the same database. I was wondering if a realm database can be used for standard web development.

This section of their "Sync" documentation explains how to use GraphQL for
retrieving Realm data in a web browser [...]. The API supports retrieving data or applying changes via HTTP requests and realtime subscription events via a Websockets connection.
So yes, a realm database can be used in standard web development (including frontend), via GraphQL.

Related

Sync Data between Android App and Server Couchbase Lite

I want Couchbase to first temporary store the data, and then automatically sync it with Server. How do I achieve this ?
For example, In note-making app, I add a note and Couchbase should automatically add it to the Server.
You're in luck! The requirement you've described is exactly how Couchbase Mobile works.
Couchbase Mobile is comprised of two parts:
Couchbase Lite: A stand-alone embedded database that you can use directly within your mobile app.
Sync Gateway: a synchronization mechanism that securely syncs data between mobile clients and server.
So, back to your question. In order to achieve what you're looking for you would first create an instance of your Couchbase Lite database. From there, as you would expect, you can perform basic CRUD operations, query data, etc. You can find more information on the built-in capabilities here:
iOS (Swift)
iOS (Obj-C)
Android (Java)
Xamarin (C#)
Once you've created an embedded database you can start replication (synchronization) on it by using the Sync Gateway integration that comes with the Couchbase.Lite and Couchbase.Lite.Enterprise SDK component for iOS, Android, or Xamarin.
I recommend checking out the following tutorials for using Couchbase Lite and Sync Gateway:
iOS: Data Sync Fundamentals
Android: Data Sync Fundamentals
Xamarin: Data Sync Fundamentals
You are looking for the Couchbase Sync Gateway: https://docs.couchbase.com/sync-gateway/2.1/index.html

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

Shifting data from local android sqlite database to cloud.

I made an android application which is collecting data from a wearable device and storing it into a local sqlite database.
Now I want to sync the data of all android devices local sqlite databases to cloud and visualize the data and perform data analytics related operations on it.
Can anyone suggest me what to do?
I have looked around multiple clouds like AWS, GAE, AZURE, HEROKU, GoDadddy shared cloud etc for storing my data in a central database.
My question is that should I directly store data from android into mysql or some other database using jdbc or odbc driver or write a webservice or api for storing data in cloud?
I want to sync data after some time interval i.e. a day or so, between local android device and cloud.
According to your description, based on my understanding, you want to sync up the data from wearable device between all android devices and cloud.
Per my experience, the way to directly store data from android into database is not a good choice. The normal way is creating a web service or rest apis to communicate with mobile device for data synchronizing to cloud.
On Azure, the best practice for your needs is that creating an Azure Mobile App instance and enable the Offline Data Sync feature in Azure Mobile Apps to implement this. You can refer to the Azure offical document Offline Data Sync in Azure Mobile Apps to know the related concept.
You can get start with the tutorial for Android within Azure Mobile Apps, and then continous to the next tutorial to implement the feature of offline sync up data automatically.
As reference, the tutorial How to use the Android client library for Mobile Apps will shows you how to use the Android client SDK for Mobile Apps to access the data from SQL Azure table online.
Meanwhile, to visualize the data and perform data analytics related operations on the cloud data, Azure support more Intelligence + Analysis services which could be used for your future plan.

Connecting Android app to amazon RDS

I have an Android application and I want to move my local database in the cloud. I decided for a SQL database and not for a NoSQL, because I want to execute complex queries. I created a database instance in RDS from Amazon and I populated the database.
Now I want to connect my mobile app to my cloud database. I saw samples for NoSQL database connection, but I wasn't able to find examples for RDS. I saw that it is recommended to create a web service and connect to that web service, but it seems much more complicated than using a NoSQL and this doesn't feel right.
Does Amazon offer some API/service for Android - RDS connection? Do you know any sample code that handles this aspect?
Does Amazon offer some API/service for Android - RDS connection?
No. AWS does not currently have an API for interacting with an RDS instance.
Do you know any sample code that handles this aspect?
You may want to access your database with PHP and get a JSON response. If your RDS instance is using MySQL then you’re in luck. There is already a lot of documentation on connecting Android to MySQL using PHP. You can get great sample code and instructions on this blog post.
Here is a very popular reference for connecting Android and MySQL.

Can you use the database on a website for android?

I'm developing an app and a website simultaneously. The website will be done in django and using Google' app engine, so therefore Google's database. IS there anyway i can download and use the database for an android app? Preferably I would like it to download and make it available offline to the users.
use a REST api like django tastypie on the server side, and consume the rest resources for the models you need with your android app. After you get the Json/xml messages on your android just save it to the local sqllite db
Android does provide a SQLite interface for you to read and write to a local db. You could fetch the db through a web request and save it locally, yes. Being on Google App Engine does not help / hinder your ability to do this.

Categories

Resources