Posts

Showing posts with the label android

[Flutter] Get some special directories path

Image
I'm sure, if you are a Flutter's developer, that you will need one day to get specific paths, for instance to store files, generate temporary files etc... Path_provider package For that I use the 'path_provider' package that has some helpers methods. For example: Future < Directory >   getApplicationDocumentsDirectory ( ) returns the documents directory. How to use it ? Directory tempDir = await getTemporaryDirectory(); String tempPath = tempDir.path; Directory appDocDir = await getApplicationDocumentsDirectory(); String appDocPath = appDocDir.path; Follow the links: Package:  https://pub.dev/packages/path_provider Package's documentation:  https://pub.dev/documentation/path_provider/latest/index.html

[Flutter] Splashscreen (native way)

Image
The splash screen is the first screen you see when you start your app. - you can display your logo for instance - and while the splash screen is shown,  your application is loaded (like user data, business data...) In this example we will use flutter_native_splash package. I- Package: flutter_native_splash (for native splash screen) In your " pubspec.yaml " file you have to add the correct dependency, here at less version 2.0.5 # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions # consider running `flutter pub upgrade --major-versions`. Alternatively, # dependencies can be manually updated by changing the version numbers below to # the latest version available on pub.dev. To see which dependencies have newer # versions available, run `flutter pub outdated`. dependencies : flutter : sdk : flutter flutter_native_splash : ^2.0.5 hint : Pubspec Assist extension To auto

EMGU with Xamarin Forms guide [part 1]

Image
I- Introduction, OpenCV and EMGU Do you know OpenCV ( Open Source Computer Vision Library:  https://opencv.org/ ) ?  This open source library let's you work and play with images and videos with a lot of powerful image processing algorithms !  If you want some details, I suggest you to first navigate to the link above or search for 'OpenCV' on Google.  Examples of OpenCV processing found on the web (filters, object detection, edges...): EMGU is a .NET OpenCV wrapper. That means that you will be able to use OpenCV functionnalities in your .NET projects using C# for instance. EMGU is cross platform, so you will also be able to use it in your Xamarin projects ! That's great because there is no advanced image processing library in Xamarin. In this article, we will talk about EMGU and list the steps to setup a Xamarin Forms project using EMGU . It may help you because, we must say that it's not a trivial task...  II-What do I need to

Xamarin Forms essential: FFImageLoading, manage your images

Image
Discover 'FFLoadingImage' library Today I want to make a quick presentation of a really good library for Xamarin Forms . This is the kind of library we would like to see more often on XF... This one is dedicated to image manipulation. It's called " FFImageLoading ". If I take time to make this presentation, it's because I think that we should use it in almost all our "basic" Xamarin Forms applications. When I say basic, I exclude Games or other specific apps. But in my mind, I suggest you to change all your traditional "<Image />" by "<FF:CachedImage />" in your apps. Before to start, where to find it ? On Github:  https://github.com/luberda-molinet/FFImageLoading On Nuget:  https://www.nuget.org/packages/Xamarin.FFImageLoading Main features So what will you find using this library ? I will not explain all the details but the main interesting features of the library. Multi-platform The good po

[Xamarin Forms] Custom bottom bordered entry (iOS & Android)

Image
Custom entry with renderers For my Xamarin Forms project I needed to render an 'Entry' control with a bottom border of a specific color. There are several possibilities but I will show you mine. For that, I used renderers. iOS one is particularly not trivial. The wished result look like that: iOS Renderer [assembly: ExportRenderer(typeof(ExtDatePicker), typeof(ExtDatePickerRenderer))] namespace MyCompany.iOS.Renderers { public class ExtDatePickerRenderer : DatePickerRenderer { protected override void OnElementChanged(ElementChangedEventArgs<DatePicker> e) { base.OnElementChanged(e); // Need to connect to Sizechanged event because first render time, Entry has no size (-1). if (e.NewElement != null) e.NewElement.SizeChanged += (obj, args) => { var xamEl = obj as DatePicker; if (xamEl == null) ret

[Spoon] Android testing tool

Image
Did you heard about Spoon ? If you are a mobile developer (in our case an Android developer with hundreds of available target devices), and you know how much testing your app is important, take a look at Spoon ! This tool will enable you to test your app simultaneously - on several android devices, - to take different steps screenshots during your tests, - to display the results in a meaningful way - to compare screenshots from the several devices... Spoon is available on Github: https://github.com/square/spoon All you need to start is here: http://square.github.io/spoon/ Just take a look below or click on the link below to display a Spoon output sample: http://square.github.io/spoon/sample/index.html

Android Ad-Hoc app publication guide (with Xamarin Studio)

Image
Warning before to start Before to install a custom APK app on your device, make sure it comes from a secured and trusted source ! Generate your APK using Xamarin Studio In order to have a valid package file (APK file), we have to generate a valid package signed with a security certificate. You can use a temporary certificate for test purpose. The process bellow shows you how to do that using Xamarin Studio Wizard: Generate your APK Select Archive for publishing menu Then select "Ad-Hoc" option (to generate your APK localy) Click on "Sign and distribute" Create a custom signing certificate Create a temporary certificate to sign your APK file Install the APK on the target device Configure the target device In order to accept and install a "custom" APK (application coming from other sources than the Play Store), you will need to unlock your phone. This is done in the phone's parameters