Database connection with c# computer program and java android application - c#

Ok im working on something and i have one question if this is even possible. I am doing 2 applications. One will be on the computer and the other will be on android device. On the computer user will input some data that will be stored in the database. The database will be local at my computer. Is there anyway that i connect to the same database with my mobile phone if it is on the same wifi, and store some information to that database from the mobile phone?
And what should i use? sqllite or MySql. Is it better to write the android application in java or in c# with the xamarine?
Thank you

Is there anyway that i connect to the same database with my mobile phone if it is on the same wifi, and store some information to that database from the mobile phone?
Yes it is. If database is available trough the network you can establish the connection.
Depends on what you're trying to accomplish, I would rather create the data service (using WCF for example) that would expose interface for both desktop and android applications. In this way you will have unified model for working with database. But you can work with database directly as well. There should be plenty of example of how to do that.
sqllite or MySql
You can work with any of them, it is more task specific then technology specific question. IMO, SqlLite might be a bit easier to use though
Is it better to write the android application in java or in c# with the xamarine?
Doesn't really matter. I would say if there is no specific reason why you want to chose xamarin, go with java.

There is wide range of posibilities. You can use SQL, NoSQL, plain text.. whatever you want. Xamarin Forms can be a good starting point especially using MVVM. With the same logic you can code both the desktop app and the mobile app. Try Catalog, http://catdb.eu. It does the same as you trying to achive.
For Xamarin.Forms there is a good reference book. It is pretty good. https://developer.xamarin.com/guides/xamarin-forms/creating-mobile-apps-xamarin-forms/

Related

Send data from UWP app to Unity3D on the same machine

I have a universal apps getting data from Microsoft's Band 2 (accelerometer) and want to export the processed data in the app to the unity project to be used as input control. The data will be frequent, so real-time response is preferred.
What should I learn or use to achieve this?
I'm pretty sure it would be easier to write a plugin for Unity to connect to Band directly rather than to connect to an app that connects to Band (actually I have no clue how to do that).
Having that in mind, you probably should:
download the appropriate Band SDK from the official website
Read about writing plugins for Unity for the platform you need (Desktop/WP, Android, iOS)
Draw a pentagram and hope for the best

Connectivity with DB for Window store using Blank app template

I am trying to make a quiz application for Windows Store using the blank app template (in VS2013). I have the UI laid out in XAML but I don't know how to fetch Questions saved in my DB (MS access or SQL).
I have tried to find tutorials related to it,but what I have found is for WPF and Windows Forms. I had chosen the Blank app template, so can anyone explain how to fetch question from the Database in an application using Blank app template?
As it turns out, there's a good reason you couldn't find a tutorial for accessing a local DB in the WinRT environment. You can't. Microsoft didn't even include the requistite ADO.NET assemblies, assuming you could get out of the sandbox in order to connect.
There is a SQLLite project for Windows Store apps, found here. That's about as good as you can get it right now in terms of a local relational database in a windows store app.
What Microsoft intended for you to do was to store your database in the cloud (and if they have their way, on Microsoft Azure) and access it using a web service. Support for that is all over the WinRT API. It sounds like thats probably what you want anyways (unless you expect your users to generate their own questions) so I would go into that route.
A starting point for that would be to use Azure Mobile Services.
One last thing to note, WPF and WinForms are not WinRT, but there are other project templates (like the Hub template) that are. The fact that you chose the "Blank" template doesn't really affect anything in this regard.

How to get started with Windows Phone database programming

I am really new to Windows Phone ( and Windows) development, and C#.I have done my first program as a unit convertor for Window Phone 8.1 using C# and Silverlight, run it on emulator and Phone both.
Now I want to build an application that can store data (e.g. a diary, that I can store plain text in it daily), something like usage of database, but I really have no idea how to do it and whether I need some sort of database, like SQLite, or there is some built in solution to store custom data in Windows Phone itself.
Can you please tell me how to and where to start?
In Windows Phone Silverlight apps, you have the option of using a SQLCE database with the LINQ-to-SQL framework on top of it (see docs here). If you're considering building a universal app that will run on both Windows and Windows Phone, however, your only database option is SQLite (see here for more details).
That said - unless you need to perform queries across a large amount of structured data, a database is probably overkill for your app. You may want to consider simply using flat files (docs here) to start and only upgrading to a database if the amount of metadata for the diary entries grows beyond what you'd want to keep in memory.

Synchronizing between PC app and Android app

I have encountered a difficulty while trying to figure out how certain aspect of my program will work:
(There is no code written at the moment, only concept).
I have a PC application which I want to build with C#.
In addition I have few android devices with my java application on it, which will be dependent on the PC application but will have its own functionality.
The android application will have to read data from the PC application and vice versa as well.
At first I thought creating a server which all applications will read from.
But now I'm thinking maybe there is a easier, less complex way (since I have no idea about accessing to servers and I'll have to learn the entire thing) - creating a network and shared folders - now the PC application will save his data at the shared folders and the android application will read the data from the shared folder, every 5 minutes or something like that or create a listener that will update the application upon any change made by the PC application.
The android application will have to do the same, save his data at the shared folders and let the PC read from the shared folder.
Basically, this is my idea, now my question are:
What do you think about the implementation of the idea?
Is it possible to access shared network folder with android device?
Is it possible to add android device to home network?
The combination of C# PC application and java will be alright?
Thanks in advance.
Answer of your questions :
This idea in implementable surely
I do not know for sure , but it should be .
Yup , it's very much possible using a WiFi connection.
This will not a problem as you have to use Webservice/Socket Programming (i will prefer for socket) where multiple platform is not a problem at all :)
Happy coding :)

Ideas for a C# UI framework

I need to develop a C# touch-screen desktop application with a "modern good-looking" UI.
How would you approach it? I´ve got in mind using Flash (just for the UI) or WPF... but i´m open to any idea or any third-party C# UI you´d know.
Is Flash easy to integrate with C#?
Thanks for your knowledge!
You should look for a AMF remoting library in C#.
Remoting is when you call a function on your server from flash.
AMF (version 0 or 3) is a binary format used to encode object transfered
between client and server
Weborb and fluorine are solutions for this.
see : .NET and AMF
You will probably be doing well with a third party framework to avoid the overhead of writing user interactions, controls, etc.
A couple of options are
http://xamarin.com/
http://www.resco.net/developer/mobileformstoolkit/
A review of these options is provided here.
I recall combining a flash interface with a C# back-end back in university. There's a method called fscommand() that will take a couple of string parameters (I may be mistaken, read up on it) to pass to and from the interface and the C# "code-behind".Flash is an ok option, but if I were you I'd opt for a WPF interface. I'm a huge fan of the telerik libraries, their WPF one allows you to create the most modern-looking interfaces and dashboards. Not to mention that the skills you will acquire while learning enough about wpf will be hugely beneficial in your career as a developer the way things are going (depending, obviously, on what direction you're heading).
FlashBuilder 4.6 has some nice functionality for quickly building a UI that work on a desktop or mobile device. You could use FluorineFX (free) or webOrb on a webserver to send data back and forth to a database server if that were needed. If you build it with the Flashbuilder 4.6 mobile project template, it would work on a iPad, mac, windows pc, or android device as well. Since a pc touchscreen should use the same type of finger gestures as a mobile app, this might be a nice way to go. (I don't actually have a touchscreen on my pc, but it runs well with a mouse, so I'd assume it worked with gestures too).
Adobe.tv has lots of examples of building a mobile app project (Which also runs on a PC) and there is a Flashbuilder 4.6 free trial.
http://flex.org/

Categories

Resources