Xamarin Android Apps and Azure SQL Databases - c#

I'm a second year student and for my last project I'm interested in doing a Xamarin Application. So I just got started with Xamarin and I've been doing the tutorials in developer.xamarin to learn new things. However my ultimate goal is to make an Xamarin.Android App which has multiple screens which will be used to interact with an Azure SQLDatabase which is already being used for my ASP.NET Forms Website, so that I can use both like Facebook to as an App as well as an Website.
While I was searching for examples I got this by Xamarin This Link (Which is quite complicated and some unknown errors pop while I'm developing it) but, while I was reading the forums I got this C-Sharp Corner Tutorial which is quite easier than the original Xamarin Blog Example. Later I found another approach given in StackOverflow which is Hosted In GitHub. It would be grate if someone could explain me what is the correct approach (and what is used in the Industry) from above three and which is the most optimal solution for my app goal.
Plus, According to the articles I read, here's what I understood so far, It is unsafe to directly connect an Azure SQL Database to an Android App like we used to do in ASP.NET applications so what we usually do is use Some Mechanism called REST based on Json requests. It would be great if someone could tellWhat is the way to interact an Android Application with an Azure SQL database
Thanking in advance :-)

There is a really easy way to do this by using the example officially provided by Xamarin about Consuming a RESTful Service which can be found in Consuming a RESTful Service and developing its ASP.NET Core Back-end API which can be found in above URL which is provided my Microsoft
Thanks

Related

Compiling C# Code in UWP

I have using the built in CSharpCodeProvider class in previous C# .NET projects and it has worked great. I see this has been removed in UWP. I've been banging my head against the wall trying to figure out if there is a way. I can't seem to find any scrap of information. But, I did come across an interesting app called #Code by Shahul Hameed on the Windows Store. This software claims to be able to compile code and be able to run it, and indeed it does. How are they achieving this, if such actions are not possible on the framework? Is it possible they're sending the code over the net to a web service of some kind and getting the returned console output? I thought so, but what about the live stdin support they've provided in the app, how would that work in a cloud compile situation?
Thanks for shedding any light
Code on Windows Store: https://www.microsoft.com/en-us/store/p/code/9nblggh4s3mf

What is the best alternative for a native app using webviews interfacing with a C# web based application?

I am building an android + iOS app that has its own functionality as well as incorporates functionality of another web based application.
I am using Telerik to build out the interfaces, and probably OAuth to handle the sign-on.
I do however have the issue of handling portions of the C# functionality within my app, and I wanted to know what the best way was to interface between the database of the C# app.
There are obviously many rules associated with each action. For example, if a student uses the android app and wants to upload a grade to the (previously handled by C# web app) database, how do I go about doing this? Do I have to rebuild all functionality within my app? Is there a way I can use API's to retrieve info defining rules?
I am very against WebViews as it is slow and clunky.
Apologies if I seem silly here, not very experienced in the matter.
Any help or guidance is greatly appreciated.
So, Basically you wanted to go for cross platform mobile application Development !!
Then you have lots of options where you can use your web based knowledge to build mobile application
Like , Phonegap , Titanium and many more , there you can just use you own web based knowledge and make good Mobile application
http://phonegap.com/
http://www.appcelerator.com/
also , if you wanted to go for c# only then i suggest you to go for
xamarin
http://xamarin.com/
Also you will get so many api and guide for that about sqlite and also so many good designs are also available in this all platforms !
Do let me know if you need more information !!
Happy Coding !!

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.

Facebook C# ASP.net

I am working on a ASP.net application and as extension I need it to be ported to facebook . I have searched for various documentation , including Stackoverflow ..But there is not much available to work through . I am good with ASP.net but , is there anywhere a good documentation to read like Course 101 for developing Facebook application using ASP.net.
The best is thing is to read the official Facebook documentation, and implement a solution using REST. The APIs are constantly in flux, so reading about which APIs are deprecated and which aren't is a realy good idea.
I'm not a fan of Facebook SDKs as they frequently break or are abandoned. It's beter to build on a technology based library like Hammock or HttpClient. I wrote an article about this approach here which might be useful.
Besides from the given ones, here is two good conference session videos for Facebook Development with.Net :
Facebook Development in .NET :
http://channel9.msdn.com/Events/MIX/MIX11/OPN06
Building Facebook Apps with Microsoft .NET and Deploying to Windows Azure :
http://channel9.msdn.com/Events/MIX/MIX10/EX23
The official Facebook C# SDK is at Codeplex
http://facebooksdk.codeplex.com/
Is stable and well maintain , currenty at version 5.2.1 (Aug 23 2011)
The documentation is also great!
I would strongly suggest that you take a look at the MIX 11 video from Jim Zimmerman (creator of the Facebook C# SDK) at Channel9
Facebook Development in .NET
Regarding Facebook itself, you really need to start searching because it always varies from what do you really want to do and what information are you taken / adding into Facebook.
Make your aplication in asp.net.Make a canvas applcation in facebook and give the url of your application in he setings.
Link to make app: https://developers.facebook.com/apps
I would suggest becoming familiar with Facebook's Graph API and taking a look at Facebook's C# SDK (comes with a sample program) which was announced by a Facebook Engineer at https://developers.facebook.com/blog/post/395/.
Keep in mind that, last I heard, the SDK is an Alpha release so there may be issues. Be sure to report them.

How do I implement the Facebook SDK for .NET into a Windows Mobile 6.5 application?

Basically what I want to do is use the SDK available here, to post specific status-updates to a profile which has been logged into.
Now it seems to me that the project has been on a standstill for some days and the documentation is REALLY lacking.
My current setup is as stated below:
Visual Studio 2008
Windows Mobile 6 Classic Emulator
.Net 3.5 (Compact I believe)
So far I've been able to get the emulator running and get some GPS stats from a fake GSP generator.
What I've not been able to do however is figuring out the Facebook SDK. It seems that most of the examples (or atleast the ones I actually need, such as Authentication) are based on .Net 4.0 and I can't find any .Net 3.5 examples on authentication or how to log-in using the SDK.
There are examples that point out how to post updates etc. for 3.5 but there aren't any for authentication/login etc.
So does anyone know how to use the SDK with the setup I described above? When I figure it all out I'll make a blog post on my blig explaining all the steps I took to get it all working together and will post a link here for others.
But until I know how to get the SDK working for 3.5 I can do nothing.
So please help me find the answer. I'll try looking through the source some more. However since I don't have VS2010 I can't look at the .sln files they used for the source... So will try, but can't promise anything
Thanks in advance.
The SDK isn't supported on WinMo 6.5 with the compact framework. However, interacting with facebook is really easy, provided the framework provide you with some required capabilities:
1) You must be able to leverage a WebBrowser control to manage user authentification, as demonstrated here .
2) You then will be able to interact with Facebook through simple POST and GET request. Demonstrated here for a Wall post request.

Categories

Resources