Skip to content

Instantly share code, notes, and snippets.

@iamchathu
iamchathu / Vibration.cs
Created November 14, 2017 18:37 — forked from aVolpe/Vibration.cs
Vibration for Unity3d with Android native Call, with fallback to Handlheld.Vibrate()
using UnityEngine;
using System.Collections;
public static class Vibration
{
#if UNITY_ANDROID && !UNITY_EDITOR
public static AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
public static AndroidJavaObject currentActivity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
public static AndroidJavaObject vibrator = currentActivity.Call<AndroidJavaObject>("getSystemService", "vibrator");
@iamchathu
iamchathu / main.dart
Last active November 9, 2018 19:41
Hello Flutter
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Hello DevFest',
home: Scaffold(
appBar: AppBar(
title: Text('Hello DevFest Colombo'),