Creating a Xamarin Form Library in Visual Studio Mac - android

I want to develop a library for Xamarin Forms just like how we do in native iOS and android, like .framework or .a for iOS and .aar and .jar for Java Android.
I researched a lot and saw that we can create a nuget Packages based on Platform dependent environment .. But In my case I want to create a SDK which will only make HTTp calls and hence I don't want to use any platform dependent code .
I also found that we can create .Net Standard Library, but didn't get any useful material or Link to work Forward.
My Requirement is to create a SDK which can be used in Xamarin Forms Project . Can SomeOne Please guide me.
Thanks in advance

Related

Nuget Libray in Unity for other platform

I have a project that used Nuget Libraries and I implemented in Unity using C#. The program worked if I run Unity in Windows, but I wonder is it possible to port this project to another platform using Nuget library inside the code? because Nuget Library is a library for .NET in Windows. I actually want to implement this Nuget Library to LuminOS which can run the application from unity.
If I use Nuget Library in Unity? Is it possible to deploy the games on another platform besides Windows for example for Android, iOS, or LuminOS? Is it gonna work because Nuget package is libraries we use for Windows?
hi i have the same problem except i want to build for android and i have searched for an answer this is what i got:
you should reach to .dll files and put them in package folder and this is the only way it will work on android here is an example:
https://answers.unity.com/questions/743400/database-sqlite-setup-for-unity.html
I managed to make it work some thing you should keep in mind is i think the only way to make it happen is by set your player build settings -> other settings -> scripting Backend to Mono and Api Compatibility Level to .Net standard 2.0

How to use GUI in visual studio 2010 for android application

Hy I am new to visual studio .I search a lot and successfully create first application of android in visual studio 2010 using c++ but I don't find anything related to GUI.Please help me I want to create button,imageview,textbox etc in my android application using visual studio 2010 with c++
regards
To use native(C++) code in android application you need Android
NDK
Are you sure you want to create a GUI for Android using C++ there several libraries to create layouts with few XML/Java lines? For your question I suggest you read the Android NDK documentation to know how to properly implement C++ in your project.

JAVA NATIVE INTERFACE IN Android Studio

is java native interface is available is possible using android studio ,if yes any good tutorials to follow .
https://developer.android.com/sdk/installing/studio.html
in this page showing ndk is coming soon in android studio
Android studio supporting is not so powerful like eclipse but ofcourse you can use ndk.
See this links:
http://ph0b.com/android-studio-gradle-and-ndk-integration/
http://www.shaneenishry.com/blog/2014/08/17/ndk-with-android-studio/
I think it must help you.

How to add Raknet to Cocos2d-x

I try to add Raknet to Cocos2d-x game engine for android games but I don't know how .
I couldn't find good tutorial about this integration . I can compile and run both of them separately as well , the problem is integration of them .
I think that I should change my Android.mk .
I see these links and some more but I couldn't find them useful :
http://www.jenkinssoftware.com/forum/index.php?topic=5069.0
http://www.jenkinssoftware.com/forum/index.php?topic=3744.0
The Completest Cocos2d-x Tutorial & Guide List
https://code.google.com/p/fellz/source/browse/trunk/cocos2dx?r=7
my cocos2d-x version: 3.2, raknet : 4.x, ndk : r9d
I use Visual Studio and a document about compiler setup in RakNet tutorials. I followed this doc and finally created a DLL form the Raknet sources, put it next to the my game's .exe file, and it worked well.
You should also add Raknet sources to included header files of Visual Studio.
Update:
RakNet is not the best way; try another way like WebSocket or Socket.io. Socket.io is highly recommended and is already used in cocos2d-x sources, but it's not compatible with socket.io 1.X. You can make some changes to Socketio.h and Socketio.cpp to use it with socket.io version 1.X. Also, cocos2d-x says they will consider this issue in the next releases.

How to embed jars to make them usable in Xamarin cross-platform App

I am trying to port my Android Application, developed with Google Android ADT, in Xamarin to make it cross-platform and runnable on iOS devices.
I am ready to translate the needed code from Java to C# but I don't know the best way to manage external libraries.
I am using 3 jars in my App:
android-support-v4.jar
mysql-connector-java-3.0.17-ga-bin.jar
YouTubeAndroidPlayerApi.jar
I tried to embed them following these instructions:
http://docs.xamarin.com/guides/android/advanced_topics/java_integration_overview/binding_a_java_library_%28.jar%29
but I'm getting some compilation errors. Here's one of them:
'Com.Mysql.Jdbc.Util' in '[..]\AndroidHelloWorld\JavaBindingLibrary\obj\Release\generated\src\Com.Mysql.Jdbc.Util.cs'
is in conflict with
'Com.Mysql.Jdbc.Util' in '[..]\AndroidHelloWorld\JavaBindingLibrary\obj\Release\generated\src\Com.Mysql.Jdbc.Util.BaseBugReport.cs'
I don't know if it's worth going on trying to fix the errors or it's better to use native libraries for iOS.
As you'll have separate projects for each platform, I would just use the appropriate jars, as there can be differences in the way Youtube works, for example, that would make the android jar unusable in an iOS project.
But about the errors you encountered, it's worth reading this link thoroughly.
You won't be able to use any of your Android specific code or libraries on iOS.
You have two basic options for cross platform development, to create a Xamarin Forms project or create a iOS, Android and Shared project.
If you decide to go with Xamarin Forms you will need to:
* Extract your platform independent code into a shared PCL project
* Redevelop your front end in Xamarin Forms
If you decide to go with separate projects you will need to:
* Extract your platform independent code into a shared PCL project
* Develop an iOS front end project

Categories

Resources