AndroidNativeCore.Pickers

Description

This class allows you to pick data and time from android native picker dialog and also pick image from both gallery and camera as you need in your game

Summary:

Pick Date:

Public Method:
void pickDate(int year, int month, int day, onDateSet onDateSelect)

this method takes year,month,day as int and onDateset as delegate as call back result

Example:
                    
using AndroidNativeCore;
using System;
using UnityEngine;

public void pickDate(){
DateTime today = DateTime.Today;
Pickers datePicker = new Pickers();
datePickers.pickDate(today.Year,today.Month,today.Day,(int y,int m,int d) => {
    Debug.Log("Selected Date: "+y.ToString()+"/"+m.ToString()+"/"+d.ToString(););
});
}
                    
                

Pick Time:

Public Method:
void pickTime(int hour, int miniut, bool is24HoursFormat, onTimeSet onTimeSelect)

this method takes hour,miniut as int, if bool is true given values are 24 hours format else 12 hours format and onTimeSet as delegate as call back result

Example:
                    
using AndroidNativeCore;
using System;
using UnityEngine;

public void pickTime(){
DateTime today = DateTime.Today;
Pickers datePicker = new Pickers();
datePickers.pickDate(today.Year,today.Month,false,(int h,int m => {
    Debug.Log("Selected Time: "+h.ToString();+"/"+m.ToString(););
});
}
                    
                

Pick Image From Camera:

You need add "android.permission.CAMERA", "android.permission.READ_EXTERNAL_STORAGE" and "android.permission.WRITE_EXTERNAL_STORAGE" Permission to work this feature Check How to add Android Permission with simple clicks.

Public Method:
void pickImage(int year, int month, int day, onDateSet onDateSelect)

this method takes year,month,day as int and onDateset as delegate as call back result

Example:
                    
using AndroidNativeCore;
using System;
using UnityEngine;

public void pickDate(){
DateTime today = DateTime.Today;
Pickers datePicker = new Pickers();
datePickers.pickDate(today.Year,today.Month,today.Day,(int y,int m,int d) => {
    Debug.Log("Selected Date: "+y.ToString()+"/"+m.ToString()+"/"+d.ToString(););
});
}
                    
                

Pick Image From Gallery:

You need add "android.permission.READ_EXTERNAL_STORAGE" and "android.permission.WRITE_EXTERNAL_STORAGE" Permission to work this feature Check How to add Android Permission with simple clicks.

Public Method:
void pickImage(int year, int month, int day, onDateSet onDateSelect)

this method takes year,month,day as int and onDateset as delegate as call back result

Example:
                    
using AndroidNativeCore;
using System;
using UnityEngine;

public void pickDate(){
DateTime today = DateTime.Today;
Pickers datePicker = new Pickers();
datePickers.pickDate(today.Year,today.Month,today.Day,(int y,int m,int d) => {
    Debug.Log("Selected Date: "+y.ToString()+"/"+m.ToString()+"/"+d.ToString(););
});
}