Android Ultimate Plugin Speech Recognizer 1.7.5

Hello Guys, its been a while since i last post about our Android Ultimate Plugin and now i will just clarify some things on Speech Recognizer because a lot of people is getting confuse on some of the Speech Recognizer API’s

1# StartListeningWithExtraSetting

 

numberOfResults – the number of possible results based on what you say

 

speechMinimumLengthInMillis – speech recognizer will continue to listen until reached this time. based on android developer documentation https://developer.android.com/reference/android/speech/RecognizerIntent.html#EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS

The minimum length of an utterance. We will not stop recording before this amount of time. Note that it is extremely rare you’d want to specify this value in an intent. If you don’t have a very good reason to change these, you should leave them as they are. Note also that certain values may cause undesired or unexpected results – use judiciously! Additionally, depending on the recognizer implementation, these values may have no effect.

Constant Value: “android.speech.extras.SPEECH_INPUT_MINIMUM_LENGTH_MILLIS”

speechWaitingTimeInMillis – the length of time to wait to consider that speaking is already done or complete. based on Android Developer documentation https://developer.android.com/reference/android/speech/RecognizerIntent.html#EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS

The amount of time that it should take after we stop hearing speech to consider the input complete. Note that it is extremely rare you’d want to specify this value in an intent. If you don’t have a very good reason to change these, you should leave them as they are. Note also that certain values may cause undesired or unexpected results – use judiciously! Additionally, depending on the recognizer implementation, these values may have no effect.

 

2# StopCancel – is just a combination of stop and cancel this one will stop the current task and then cancel it

3# EnableModal – when true it will show a text telling the people to say something, false to hide the text

4# EnablePartialResult – will send partial results even if the speech is still in progress

5# SetCallingPackage – you need to pass a package id string here ex. com.yourcompany.youapplicationname, this is required when your app or game is targeted for kids please look for google play store policy for this

6# EnableOffline – you can pass true here if you want to use it offline but on some phone models this one is not working cause not every phone got the same hardware and software

7# CancelSpeech – cancel the current speech recognizer task

8# StopListening – to stop listening

Together with Speech Recognizer demo we also used

this one is to mute and unmute the beep because usually on android there’s a built in beep when you used Speech Recognizer

Common Questions

  1. can i continues run the speech recognizer? No , if you want this used something that is more advance like google speech recognition https://cloud.google.com/speech/
  2. Can i record using Speech TTS? nope we don’t have this feature
  3. Why other Feature of Speech Recognizer is not implemented? we didn’t implement everything to make it less problematic because some other features might create unexpected problems

I Hope this short post make things clear to you guys 🙂

If you have comments or suggestion or any feedback just email us at gigadrillgames@gmail.com

Image Picker version 2.0 – Android Ultimate Plugin (1.7.4) for Unity3d

Today we added a new Feature on Android Ultimate Plugin for Unity3d and that is you can now get 2 or more images at the same time, well at first we thought that adding this feature is so easy but no it’s not that easy we need to create a Custom Gallery Activity for this because the simple Activity intent for getting more images on Android is not working i don’t know why that’s why we resort on doing this Custom Activity and this new feature required an Open Source Library and this is  Android Universal Image Loader created by Nostra13, we need this to for Caching of images and to load it faster on our Activity and to prevent crashed because of out of memory but  this is not 100% cure, out of memory can still happen specially on low spec devices so beware

Before anything else i want you to download the Universal Image Loader from this open source link https://github.com/nostra13/Android-Universal-Image-Loader/blob/master/downloads/universal-image-loader-1.9.5.jar

Or from this link if that link is down or gone

https://drive.google.com/file/d/0Bw14w3QBZaGxVWszZGZnMEdISlE/view?usp=sharing

and i want you to put this jar file (universal-image-loader-1.9.5.jar) on directory of your unity3d project “Assets/Plugins/Android/aup/libs”

And that’s it everything is set

Please check this sample usage on how to use it and it’s so easy right?

 

Please Note that we need the Dispatcher if we want to do something after the callback to make sure that this codes will run on the Main Thread if not you will definitely encounter some errors or issues

And there you have it so easy right? , i hope this information helps you

For more questions or comments or suggestions just email us at gigadrillgames@gmail.com

See you! Thanks for Visiting and Reading 🙂

 

Pedometer plugin (version 1.5) for Unity3d

Pedometer plugin (version 1.5)  for Unity3d

Hi Guys, we are happy to announced that we finally added the new features that every wants which is the following

  1. make the pedometer service run in the background even if unity3d Application is close
  2. Make the pedometer service auto run when the mobile device is restarted or boot
  3.  Save the steps data on each day and access them using date
  4. Continue the step count even if the Android mobile device is restart or boot
  5.  more helpers to help queries the step data

And yeah that is the main features that we added but there’s a catch when you open your Unity3d Application with pedometer plugin please don’t forget to start the service and yes the service is auto run but when you open your app you need to call the start service, you need to do this because you will not received the callback method data without starting the pedometer service.

because of this new main features you can now make  little fitbit application now for mobile but for counting steps only 🙂

Since this changes a lot of things have change on the API some method is already remove to avoid confusion on how to used it.

Here’s the list of new API methods

void StartPedometerService(SensorDelay sensorType) – this will start the pedometer service , you need to call this once to activate the pedometer service without calling this the pedometer service will not run when you close the unity3d application and you can’t even get the data from the callback because it will never trigger.

StopPedometerService() – this will stop the pedometer service only call this if you really want to stop the pedometer service but for me no need to call this if you always want to record or save the steps all of the time

void LoadTotalStep() – this will load the total step count since the last boot of your android device

public void LoadStepToday() – will load the step count today and take not each day have its own step count

public void LoadPrevTotalStep() – will load the total step count since the last boot of your device until yesterday same with LoadTotalStep but minus 1 day on total steps

int GetTotalStep() – for getting the total step count please run the LoadTotalStep before calling this because it might give you the outdated value

int GetTotalStepYesterday() – for getting the total step count yesterday please run the LoadPrevTotalStep before calling this because it might give you the outdated value

int GetTotalStepToday() – for getting the total step count today please run the LoadStepToday() before calling this because it might give you the outdated value

int GetPrevTotalStep() – same with GetTotalStepYesterday

int GetStepByDate(int month,int day, int year) – gets the step count based on date you pass for example you want to get the  step count on April 18, 2017, you need to pass int GetStepByDate(3,18,2017) look carefully on the month it’s 3 for April  because months in android  starts with Zero value remember that because if you pass the wrong date you will get the different data or nothing at all.

GetStepToday() – gets the step count for today

int GetStepYesterday() – get the step yesterday but not the total steps yesterday just the step count yesterday

int GetStepLastDay(int day) – gets the step count on the amount of day you put if you put 1 it means step count yesterday , if you put 2 that means step count on last 2 days, if you put 3 last 3 days step count, this is just a lazy helper method

public void DeleteData() – for the deleting all the step data but keep in mind that this will not reset the step count because this step count is running by the android system it will just continue no matter what we can’t control this, Note: if you want to delete and reset it to zero you need to restart your mobile device.

Note: i know it’s confusing but when we say Step Today it’s only the step count that accumulate today and when we say total step count it means the total steps since the Android mobile booted or restarted.

Note: Remove methods

Always Reset to zero

Reset Steps

 

I hope this Information helps you out on using the new Pedometer plugin (version 1.5)  for Unity3d and i hope you like our plugin , and please do give us a good reviews and please perfect stars we really need it, it will helps us a lot to make our plugin better and for us to continue adding more features  so please help us and we will help you too in return 🙂

For more questions or suggestion or comments  or feedback just email us on gigadrillgames@gmail.com

See you and have fun coding! 🙂

 

Merging Android Ultimate Plugin 1.7.1 on Google Play Services Part 2

Hi Guys, this is the continuation of my last post, last time we try to used both Android Ultimate Plugin version 1.7.1 with google play services that can be found on this link https://github.com/playgameservices/play-games-plugin-for-unity

and we encounter a lot of errors and we spend almost 2 days on finding a way on how to fix this plugin and libraries conflict and we found out the following check list

  1.  make sure all of your Android Manifest file in your project have the same min sdk value and target sdk value , as in every Android Manifest files search your whole project this usually is the caused of conflicts
  2. make sure your Android Manifest File that is using google play services is using this  meta  <meta-data android:name=”com.google.android.gms.version” android:value=”@integer/google_play_services_version” /> take note do not hardcode the version number and make sure that this meta tag is inside <Application TAG> not inside <Activity TAG>
  3.  if you have a values.xml with gms  with hardcoded version number inside just delete it , this values.xml file will just make everything worst
  4. See to it that the Android Plugin that you are using is using provided instead of compile on their Build.gradle dependency settings for classes.jar which is the jar that came from unity3d app directory. because if this is compile it will conflict on Unity3d Classes.jar because i think unity3d put classes.jar automatic when we build on Android

Some optional checklist that people says on stack overflow, unity3d forum and other forums

  1.  Right now  (  Unity3d version 5.5.1f1 ) the max  Android API support is 23 so delete the build tools and please don’t delete the SDK tools 🙂 just build tools greater than 23 API on your Android SDK.
  2.  Make sure your target SDK on your Android Manifest is declare unless unity3d will used the maximum SDK available on your machine.

And that’s the checklist and now back to using  both Android Ultimate Plugin and Google play services these are the steps

  1.  make sure all Android Manifest on your project is using this min sdk  and target sdk  <uses-sdk android:minSdkVersion=”9″ android:targetSdkVersion=”16″ />
  2.  Unity3d Player Settings should be set to minimum API 9 too
  3.  Make sure you use these exact libraries as of now we tested these and it works
  •  appcompat-v7-23.0.1.aar
  • support-v4-23.0.1.aar
  • play-services-games-9.2.1.aar
  • play-services-base-9.2.1.aar
  • play-services-basement-9.2.1

Note: some of these libraries are included when you import the google play services plugin

you can download these new libraries on this link because Unity3d  asset store for sure will not allow this libraries to be included on the plugin  https://drive.google.com/file/d/0Bw14w3QBZaGxek5haDNNeVNTRGc/view?usp=sharing

More Steps

  1.  check all the project.properties files in your project they all should used the same TargetSDK value if not you will have a conflict and it’s very high
  2.  find any values.xml lurking around with hard coded google play services values inside and delete them they create lot’s of problems
  3.  make sure you don’t have any duplicate Libraries jar,aar files and other library files they will introduce conflict as well.

And then after these changes we successfully build our project with both Android Ultimate Plugin and Google play Services and they work 🙂

The Game Sample with Google Play Services, Admob, Android Ultimate Plugin and Firebase Analytics

https://play.google.com/store/apps/details?id=com.gigadrillgames.fingervsants

here in this game we used both google play services and AUP , on share we use our plugin see it works 🙂

That’s it,  i hope this guide can help you find the problems and the conflict when using more android plugin in Unity3d Projects.

 

Update 02/12/2017

We have encounter some errors when building on xcode

Take Note this errors is came from the google play services not from our plugin to make things clear

For more details please follow read this link

http://www.gigadrillgames.com/2017/02/13/google-play-games-plugin-for-unity3d-possible-fixed-for-xcode-project/

 

for more questions or comments or suggestions just email us at gigadrillgames@gmail.com and if you have time please like our page https://www.facebook.com/gigadrillgames

Thanks for visiting and reading 🙂

 

 

 

 

Android Ultimate Plugin Major Changes 1.7.1 Part 1

Hi Guys! our Android Ultimate Plugin have Major Changes 1.7.1 that’s why I’m making this post today but don’t worry this changes only change the structure and the  way you used the plugin is still the same, so no need to worry 🙂

this is the new structure 1st level  Assets/Plugins/Android – in this directory you will see that we added a new folder called aup  where the android ultimate plugin files will move and we remove the old jars and library that we are using and we added a 5 new .aar files these libraries is our new dependencies so please remember them.

you can download these new libraries on this link because Unity3d  asset store for sure will not allow this libraries to be included on the plugin  https://drive.google.com/file/d/0Bw14w3QBZaGxek5haDNNeVNTRGc/view?usp=sharing

2nd level Assets/Plugins/Android/aup – inside this you will see the Android Manifest, libs folder, project.properties file, res folder and SampleAndroidManifest as you can see this is the same things that you see before the only difference is the AUP.jar now is inside the libs folder and we add the project.properties files to tell Unity3d that this directory is an Android Library.

Note: on res folder there’s a values folder inside and  we remove that reason it’s one of the reason why other plugin is not working when combine with Android Ultimate Plugin because it resets the API id to the old one .

Inside the libs folder you will the AUP.jar which is the jar of Android Ultimate Plugin

Note: please read and remember this new .aar libraries

Because of this changes we need to delete the followings files:

  1. google-play-services_lib
  2. android-support-v4.jar
  3. android-support-v7-appcompat.jar

And we add these new 5 .aar files

  1. appcompat-v7-23.0.1.aar
  2. support-v4-23.0.1.aar
  3. play-services-games-9.2.1.aar
  4. play-services-base-9.2.1.aar
  5. play-services-basement-9.2.1.aar

these .aar files can be found inside your Android SDK  the directory is “YOUR ANDROID SDK ROOT FOLDER”/extras/google/m2repository/com/google/android/gms inside these directory there’s a bunch of libraries see below image for reference. just check each one of them and take note the version is important it should be the same to avoid conflicts or any problem when building your project.

these are the libraries inside that directory and it’s a lot just used get what we need that’s why google make it that way because before everything is in one library (google-play-services_lib) and it’s too many if you just used few of them on your project its just a waste of storage and resources

Next the Support .aar files which is  appcompat-v7-23.0.1.aar and support-v4-23.0.1.aar , you can find it on this directory “YOUR_ANDROID_SDK_ROOT_FOLDER”/extras/android/m2repository/com/android/support inside this folder you will also see a lot of support libraries too, see the image below

during this post my next test is too try to used the google play services plugin from this link https://github.com/playgameservices/play-games-plugin-for-unity i know that most of you is using the same plugin for accessing the google play services, i will update this post or post a new one after my test if our plugin will play nice with it or will have a conflict or not

So that’s it for now , i hope this little information will make everything clear to you guys!

Combining Android Ultimate Plugin and Google Play Services continuation part 2 http://www.gigadrillgames.com/2017/01/31/merging-android-ultimate-plugin-1-7-1-on-google-play-services/

for more questions or suggestions or comments just email us at gigadrillgames@gmail.com

Thanks for visiting and reading Till next time! 🙂

Integration of Android Ultimate Plugin with Google Play Games plugin for Unity Guides and Steps

Hi Guys, I know you want to use google play services plugin while using Android Ultimate Plugin or Android Ultimate Plugin Lite  and here’s the Steps and Guides

if you are using this open source Google Play Games plugin for Unity you are lucky because we finally able to use it together with our plugin
https://github.com/playgameservices/play-games-plugin-for-unity

To make Android Ultimate Plugin or Android Ultimate Plugin Lite to work with Google Play Games Services Plugin you need to follow and do this steps

For Unity3d Version 4.6.3f1

1. Back up and delete the android-support-v4.jar file on Assets/Plugins/Android/ Directory because Google Play Games plugin for Unity has already have this jar file

2. import Google Play Games plugin for Unity from https://github.com/playgameservices/play-games-plugin-for-unity

3. follow the instructions on their github https://github.com/playgameservices/play-games-plugin-for-unity

4. follow their documentation on how to use their plugin

5. Build and run and you are good to go

For Unity3d Version 5 and above

1. Back up and delete the android-support-v4.jar file on “Assets/Plugins/Android/ ” Directory because Google Play Games plugin for Unity has already have this jar file

2. Back up  and delete the android-support-v7-appcompat.jar file on Assets/Plugins/Android/ Directory because Google Play Games plugin for Unity has already have this jar file

3. Back up and delete Android Ultimate Plugin.jar file or Delete Android Ultimate Plugin Lite.jar then download this jar https://drive.google.com/file/d/0Bw14w3QBZaGxQS1qYnJGYnFCeDg/view?usp=sharing and put it inside “Assets/Plugins/Android/” Directory

4. import Google Play Games plugin for Unity from https://github.com/playgameservices/play-games-plugin-for-unity

5. follow the instructions on their github https://github.com/playgameservices/play-games-plugin-for-unity

6. follow their documentation on how to use their plugin

7. Build and run and you are good to go

Notes: if you are not using Google Play Games plugin for Unity  anymore please make sure to put back  this jar files inside “Assets/Plugins/Android/ ” Directory because Android Ultimate Plugin needs that.

1.  android-support-v4.jar

2.  android-support-v7-appcompat.jar

3. if you are using Unity3d version 5 copy and paste the Android Ultimate Plugin.jar or Android Ultimate Plugin Lite.jar  file again

and that’s it , I hope this Guides and Steps helps you out if you are having problem using Google Play Games plugin for Unity with Android Ultimate Plugin or   Android Ultimate Plugin Lite.

if you have any comments or questions? just email us at gigadrillgames@gmail.com together with your invoice id that you received  when you bought the plugin from Unity3d Asset Store.

Thanks for visiting and reading!

Happy Coding!

Android Ultimate Plugin new way of Screen Shot and Sharing Image and URL

Hi Guys, there’s a lot of changes since we 1st release Android Ultimate Plugin and one of those changes is we made a way  to separate bundle plugin into a single plugins reason is to make it more optimize and use only what you are really want to used and today we will show you on how to screen shot and share image or URL.

If you read our old post about sharing images and URL we use the same Android Manifest Permissions. so you don’t need to change that, but make sure you have those permissions and of course the Android Manifest it self.

Permission needed on your Android Manifest file without this it will not work or it will produce an error.

 

And Here’s the new way of screenshot and sharing images and url

First you need to have the instance of SharePlugin

Then we need to pass 0 to SetDebug to remove Debug toast messages

Then to Screen shot and share images just do this

And to Share URL just do this

 

And we are done, one thing that you will noticed here is we just change the Android Ultimate Plugin with SharePlugin and actually that’s the new thing that we did here and also noticed the new way on how we Take a screen shot

 

Here’s the actual code that we used on our demo

 

I hope this short Tutorial helps you on how to take screenshot and share images and URL on the new version of Android Ultimate Plugin.

If you have questions or suggestions or any feedback just email us at gigadrillgames@gmail.com

Thank you for visiting and reading!

Android Ultimate Plugin – Flashlight Tutorial

Hi Every one, today we will show you on how to use Flashlight using Android Ultimate Plugin for Unity3d.

First you need to make sure that you have an Android Manifest file on “Assets/Plugins/Android” directory.

Next make sure you have the necessary permissions for Flashlight on your Android Manifest file.

To see the Android Manifest file use on demo please visit this link

http://www.gigadrillgames.com/2015/08/04/android-ultimate-plugin-android-manifest-permission-101/

After checking that you have an Android Manifest file on the correct Directory (Assets/Plugins/Android) and you have the required Android Manifest Permissions, it’s time to code.

First we need to have the instance of Flashlight Plugin

And then we need to set Debug to zero to hide Debug Toast Message, 0 to hide and 1 to show.

To Turn on Flashlight we just need to call SetFlashlightOn() method

To Turn off Flashlight we just need to call SetFlashlightOff() method

If you are done using the Flashlight we need to release it

without releasing it, other application that needs Flashlight or Camera will not work, when this happens you need to restart your Android Device to force release the camera Services on Android Device

For Reference here’s the actual code that we use on our Demo

 

and that’s it Guys, see how short and easy to use the flashlight and we really hope that we help you on this one.

Thanks for reading and visiting our website

For Question and Answer Forum please visit this link, you can post your question here and wait for some one to answer it but in order to do that you need to register first.

http://www.gigadrillgames.com/questions/

For more questions or suggestions or any feedback just email us at gigadrillgames@gmail.com

Android Sensor Tutorial – Shake Sensor

Hi Guys, this is the second tutorial for Android Sensor Plugin for Unity3d and here again we will show you on how easy to use it, so let’s do it.

First always check if you have a Android Manifest File on “Assets/Plugins/Android” Directory without it your app won’t work or it will crashed.

If you have an Android Manifest  File  on the correct directory ( “Assets/Plugins/Android” ) , open it and check if you have this permission

After that setup we can now start coding

First we need to get the instance of  Shake Plugin

Then Set the Debug to 0 to hide the debug toast messages else pass 1 to show debug toast messages

And then we need to initialized it.

and of course don’t forget to Setup a Listener for Shake Sensor Callback event

And Then  we start Registering Listener for Shake Sensor

To modify sensitivity just call SetSensitivity method and pass value that you want the range is 0 to 2000

To Modify Update Interval just call SetDelayUpdate and pass value that you want the range is 0 to 1000

If you are done using Shake sensor just call RemoveSensorListener method

And here’s the  exact code used in our  Shake demo scene

Note: this code needs Text and Slider , just create 4 Text UI and 2 slider inside Uniy3d and drag it on this code Inspector and don’t forget to assign the events for slider.

And That’s it we are done, thank you for reading and happy coding 🙂

For more questions or comments or suggestions just email us at gigadrillgames@gmail.com

Android Sensor Tutorial – Pedometer

Note: we just updated the Pedometer Plugin and we added lots of new features for more information on this features and changes please follow this link

http://www.gigadrillgames.com/2017/04/16/pedometer-plugin-version-1-5-for-unity3d/

After Reading that new changes and feature you can still read this but take note this is a bit old now , but don’t inside our plugin there’s a simple demo that is super easy to follow 🙂

Hi Everyone, we just released an Android Sensor Plugin for Unity3d and this time it’s about sensors and the first feature is Pedometer also known as Step Counter

for more info about Step Counter follow this link https://developer.android.com/reference/android/hardware/Sensor.html#TYPE_STEP_COUNTER

for more info about step detector follow this link https://developer.android.com/reference/android/hardware/Sensor.html#TYPE_STEP_DETECTOR

 

and now we will show you on how to easily use this plugin in no time

Quick note: this plugin will only work if your android device supports this features step detector, step counter and accelerometer without this features it will not work so read this first before purchasing the plugin.

so let’s start.

First Android Manifest Requirements

you need to have this permissions on your android manifest file, found in “Assets/Plugins/Android” directory

After checking that you have Android Manifest file in “Assets/Plugins/Android” directory and you have the required permissions it’s to start coding in C# scripts

First you need to have access on PedometerPlugin instance

Then we set Debug to 1 to see toast Debug messages or 0 to hide them

After that we need to initialize it

Then after that if you want to start on Step zero always pass true on SetAlwaysStartAtZero else if you want to continue step count just pass false

Then we need to setup listener for event callback of pedometer

And Then we start pedometer from listening on step sensor

if you want to reset step call ResetTotalStep

when  you are done using pedometer plugin call RemoveSensorListener method

To See all working codes here’s the exact code inside Pedometer Demo

Note: this code needs Text , just create 2 Text UI inside Uniy3d and drag it on this code Inspector.

Hooray we are done , that’s it i hope i should be clear now how to use it.

For Questions or comments or suggestions or any feed back just email us at gigadrillgames@gmail.com