I'm writing a cross platform app (Store App and Android) with MvvmCross. In his helpfull webcasts, Stuart Lodge shows how to use Picture Chooser Plugin to select an image from the device library. But, what about other types of files (text, xml and so on)? With a IMvxFileStore object it's possible to read text and binary files, but how to choose them?
There isn't a ready made solution for this that I know of - and 2 key mobile platforms really won't provide this (winphone and ios don't really do filepickers)
However, if you wanted to implement your own file picker interface on droid, wpf and winstore then it should be relatively easy to do:
define an interface in your core project
implement the interface in wpf and winstore using common dialogs
implement the picker in droid using simple directory listing code (or some 3rd party component)
register the components during app setup
There's an n+1 video on injecting services and plugins which may help.
Related
We are looking for a way to create a simple mobile SDK for both Android as well as iOS.
The SDK is super simple and will only make API calls and open page in WebView.
Is there a tool or language (eg. Flutter/React Native) where we would be able to create the small SDK and then export it for both Android and iOS and add in their respective repositories?
Or are we going to have to create 2 projects in for example Swift and Kotlin?
Looking for advices and best practices. Thank you.
In my android app, I have a video player where I will be using third-party SDKs for that. I am aiming to work with three different video player SDKs.
As you know, each of these SDKs has its own properties. I have managed to unify using different SDKs by having an abstract factory design pattern.
So each of these SDKs have been implemented in a separate class and I do have a "video player factory" which unifies the interface for these SDKs.
For example, in my code, I have something like this:
videoPlayer1 = VideoPlayerFactory.getVideoPlayer(new VideoPlayerFromSDK1);
videoPlayer2 = VideoPlayerFactory.getVideoPlayer(new VideoPlayerFromSDK2);
videoPlayer1.unifiedFunction();
videoPlayer2.unifiedFunction();
With this abstract factory design patter, I can have as much video player SDK as I want. However, the problem is that including all those SDKs is not logical in the app.
What I would like to do is to build the app only with one of those SDKs (based on customers need) and the app realizes which SDK is included and what instance of video player should be used.
For example, if in the build I only include SDK1, then only the instance of that SDK is created and used.
Is that possible?
Variant a) Define in your gradle file which dependencies should be included for which flavor of your app. Here is a similar question.
Variant b) Use modularization and dynamic feature delivery. You could design your app in a way where it would be shipped with no or one video player sdk. If a user needs to view a video with a specific sdk, a module containing that sdk could be downloaded by the app dynamically. (However, I haven't used this personally)
Google has an example for their Plaid App. In this app, you can read news from multiple sources. The logic to access a specific news site is capsuled in an own module which is only downloaded, if a user actually wants to access the news source for the first time. You can find the source code on github.
I have an existing Android App that we now want to leverage as an SDK (or whatever is the equivalent on Android, a library?), so that the application could be included in another Android App as a library.
The concept is that we provide a "wrapper" class that customers make calls to, which would then interface with the existing code to do the functions, display stuff and do the work our App generally does.
My hope is to be able to not have to move code around and just create a wrapper/SDK/Library interface which I can just build differently in gradle, and the result of that (a Library object?) would be given to the customer to include into their App.
Hope I am making sense. If you need more info I can give a high level example of what the App is doing.
We are designing a generic Android application using Xamarin Forms. At the same time, we need some texts that the user enters to be treated a bit differently for some of the customers, ie. run them through a custom transformation.
Instead of having to build a different version of our generic app, it would be great if we could define those transformations as an external dependency, as a pluggable "dll" or a text file with a script, maybe something like MoonSharp.
Does anyone have experience with something similar and how to achieve that in Xamarin Forms?
We did end up using the MoonSharp framework and the Lua scripting in two different projects, one on Xamarin, and another one on a classic windows service C# application. It was a great tool and gets the job done!
GOAL : I want to create a free educational tool that will allow you to write code and execute in the same app. ( preferably AS3 )
Essentially I want to be able to have a IDE written inside an Air Application and then run the code / execute inside the same application.
I'm not looking to create external files all i need is to run/execute the code from the text field. I was wondering if it's possible to use #mxmlc inside Air to do live coding.
Or perhaps any ANE's or native Android methods to archive the same goal. ( im assuming if it's possible to archive with android native code, then an ANE could be easily created )
Also i though maybe creating a limited library of all the essential Flash display library - so once i hit run in the Air app it will scan all the source code, and using a string search algorithm -> execute a list of precompiled classes inside the same app ( graphics API, display List, basic math logic, etc. ). I understand that method doesn't have to specifically target the AS3 language. But i would like to avoid creating my own language for that purpose.
Not familiar with mxmlc but i did read somewhere that it's possible to execute code on a server with maven. In that case would it be possible to send the user written source code to the server, receive back the compiled SWF file and upload it back to the app in the run-time ?
You could look at http://eval.hurlant.com/ http://eval.hurlant.com/demo/ but I'm not sure if it'll be working in Air / Android