Monday 30 October 2017

Android Native Plugin

Android Native Plugin
Introduction:
So here are two versions of this plugin. In Free version you can open gallery and select Image of any type + Android native toast , android dialog box and loading box. But Pro version provided you some additional functionality such as you can select any type of file i.e, audio,video,jpeg,png.fbx.txt and pdf by passing filter type as well as you can open camera for Image.


Link:
Free:

Features:
  • Show Toast.
  • Show Dialog Box.
  • Show android Spinner.
  • Select Image of any type (free).
  • Select File of any type (pro).
  • Open Camera (pro).


Documentation:
This plugin have a Scene name “AndroidNativeDemo”. Open the scene and Switch to android platform and run the project.

  1. This scene have GameObject name “AndroidNativePluginGO” which communicated with android library. All type of message pass to this GameObject.
  2. Demo.cs script attach to Canvas object. All buttons “On Click” event refer to demo script.
  3. You need to change player settings Go to player setting of android and change Install location to “Automatic”, internal access to “Auto” and write permission to “External (SDCard) “ or just attach “Change Settings” script to “AndroidNativePluginGO”.
  4. So if you want to integrate this plugin with your scene. Then create an empty game object having name “AndroidNativePluginGO” in your scene and attach two scripts name “AndroidNativeController” and “ChangeSettings”. All set for this plugin now
  5. If you are going to use File Picker or Image picker ( Open Gallery Function) then on file selection from device “OnFileSelectSuccess” event in “AndroidNativeController” fire.
  6. For further understanding see the Demo script and run the demo project.

Update:
Pro Version is just release( 3-March-2018 ). It will be available no asset store soon!

19 comments:

  1. When I select an image, i get a "File Select Error" toast message... Is it possible that the string dat gets return isn't the full path? I would be very interested in buying the pro version because I want to select audio files, can you help me out?

    ReplyDelete
    Replies
    1. First try to run the demo scene on your phone and check the result.

      Delete
    2. I just upload the Pro version on Asset store. It will be available soon!

      Delete
  2. No its not possible ? I have not done with the pro version But i will upload it on Unity asset store in 2 weeks

    ReplyDelete
  3. Hey Hello! Thanks for the plugin, it works really well, Could you please get me ahead with opening gallery to get a video file? ._., I need it to finish a demo :(
    Thanks!

    ReplyDelete
    Replies
    1. I will work on pro version this week.

      Delete
    2. I just upload the Pro version on Asset store. It will be available soon!

      Delete
    3. I'm not finding it yet, name and price?

      Delete
    4. https://assetstore.unity.com/packages/tools/integration/android-native-plugin-pro-112829

      Delete
  4. this Plugin is so good
    i want but the pro version,but i have a question
    can i select the .mp3...(audio)files by using the pro version?

    ReplyDelete
    Replies
    1. yes you can select any type of file see the documentation

      Delete
  5. Good complement, but unfortunately the android gallery does not work when i implement it in my project, the gallery opens but when selecting the image it not remain to rawimage....nothing happen...same when i use the script "demo" that came with the plugin... i need do any modification in any script to use in my scene? because when i run the scene "AndroidNativeDemo" it s run perfectly ...but not run when i bring to my scene...
    if u has any vĂ­deo explicative i will be glad to see that.

    ReplyDelete
  6. Yeah just see your comment on Unity store. Is you build the apk for demo scene ? is demo scene working fine on android device ? Follow the documentation

    ReplyDelete
  7. Can you add the feature to export to any file type?

    ReplyDelete
    Replies
    1. You can select any file from android gallary through Pro version.

      Delete
  8. Hi! First, thanks for the plugin.
    Now, i have a question: ¿How can i stop a progress bar?
    I tried with DismissProgressBar method after the ShowProgressBar call, but it doesn't work :(
    I wait your answer, thanks.

    ReplyDelete
  9. Hi! Great work! I would like to know how to store screenshot image in a new folder/ custom folder? And how to view/access that image after storing in my app specific folder? (I'm a noob in android and unity)

    ReplyDelete
    Replies
    1. Plugin is basically use to view your already store image in specific folder. It is not use to store new images in specific folder or moving images from one folder to other.

      Delete

Android Native Plugin

Android Native Plugin Introduction: So here are two versions of this plugin. In Free version you can open gallery and select Image of ...