Commit c5042f3c3c9ba13a974b8a309dc4636746a8ea7f

Authored by Thiago Filipe Soares da Rocha
1 parent b2b689e8

Add Share Function

Assets/Plugins/Android/AndroidManifest.xml
@@ -13,6 +13,13 @@ @@ -13,6 +13,13 @@
13 android:label="@string/app_name" 13 android:label="@string/app_name"
14 android:screenOrientation="portrait" 14 android:screenOrientation="portrait"
15 android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> 15 android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
  16 +
  17 + <activity android:name="unityplayer.UnityActivity"
  18 + android:label="@string/app_name"
  19 + android:screenOrientation="portrait"
  20 + android:configChanges="orientation">
  21 +
  22 + </activity>
16 23
17 <activity android:name=".MainActivity" 24 <activity android:name=".MainActivity"
18 android:label="@string/app_name" 25 android:label="@string/app_name"
Assets/Scenes/Main.unity
@@ -669,7 +669,7 @@ GameObject: @@ -669,7 +669,7 @@ GameObject:
669 m_Icon: {fileID: 0} 669 m_Icon: {fileID: 0}
670 m_NavMeshLayer: 0 670 m_NavMeshLayer: 0
671 m_StaticEditorFlags: 0 671 m_StaticEditorFlags: 0
672 - m_IsActive: 1 672 + m_IsActive: 0
673 --- !u!224 &160532052 673 --- !u!224 &160532052
674 RectTransform: 674 RectTransform:
675 m_ObjectHideFlags: 0 675 m_ObjectHideFlags: 0
@@ -677,18 +677,18 @@ RectTransform: @@ -677,18 +677,18 @@ RectTransform:
677 type: 2} 677 type: 2}
678 m_PrefabInternal: {fileID: 0} 678 m_PrefabInternal: {fileID: 0}
679 m_GameObject: {fileID: 160532051} 679 m_GameObject: {fileID: 160532051}
680 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 680 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
681 m_LocalPosition: {x: 0, y: 0, z: 0} 681 m_LocalPosition: {x: 0, y: 0, z: 0}
682 m_LocalScale: {x: 1, y: 1, z: 0} 682 m_LocalScale: {x: 1, y: 1, z: 0}
683 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 683 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
684 m_Children: [] 684 m_Children: []
685 - m_Father: {fileID: 726443271} 685 + m_Father: {fileID: 1530408465}
686 m_RootOrder: 2 686 m_RootOrder: 2
687 - m_AnchorMin: {x: 0.2, y: 0.22}  
688 - m_AnchorMax: {x: 0.8, y: 0.8} 687 + m_AnchorMin: {x: 0, y: 1.7}
  688 + m_AnchorMax: {x: 0.97, y: 2.2}
689 m_AnchoredPosition: {x: 0, y: 0} 689 m_AnchoredPosition: {x: 0, y: 0}
690 - m_SizeDelta: {x: 20, y: 20}  
691 - m_Pivot: {x: 0.5, y: 0.5} 690 + m_SizeDelta: {x: -237.39001, y: 0}
  691 + m_Pivot: {x: 1, y: 0}
692 --- !u!114 &160532053 692 --- !u!114 &160532053
693 MonoBehaviour: 693 MonoBehaviour:
694 m_ObjectHideFlags: 0 694 m_ObjectHideFlags: 0
@@ -1721,18 +1721,18 @@ RectTransform: @@ -1721,18 +1721,18 @@ RectTransform:
1721 type: 2} 1721 type: 2}
1722 m_PrefabInternal: {fileID: 0} 1722 m_PrefabInternal: {fileID: 0}
1723 m_GameObject: {fileID: 291722901} 1723 m_GameObject: {fileID: 291722901}
1724 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 1724 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
1725 m_LocalPosition: {x: 0, y: 0, z: 0} 1725 m_LocalPosition: {x: 0, y: 0, z: 0}
1726 m_LocalScale: {x: 1, y: 1, z: 0} 1726 m_LocalScale: {x: 1, y: 1, z: 0}
1727 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1727 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
1728 m_Children: [] 1728 m_Children: []
1729 - m_Father: {fileID: 726443271} 1729 + m_Father: {fileID: 1530408465}
1730 m_RootOrder: 1 1730 m_RootOrder: 1
1731 - m_AnchorMin: {x: 0.2, y: 0.22}  
1732 - m_AnchorMax: {x: 0.8, y: 0.8} 1731 + m_AnchorMin: {x: 0, y: 1.7}
  1732 + m_AnchorMax: {x: 0.97, y: 2.2}
1733 m_AnchoredPosition: {x: 0, y: 0} 1733 m_AnchoredPosition: {x: 0, y: 0}
1734 - m_SizeDelta: {x: 20, y: 20}  
1735 - m_Pivot: {x: 0.5, y: 0.5} 1734 + m_SizeDelta: {x: -237.39001, y: 0}
  1735 + m_Pivot: {x: 1, y: 0}
1736 --- !u!114 &291722903 1736 --- !u!114 &291722903
1737 MonoBehaviour: 1737 MonoBehaviour:
1738 m_ObjectHideFlags: 0 1738 m_ObjectHideFlags: 0
@@ -2094,17 +2094,6 @@ MonoBehaviour: @@ -2094,17 +2094,6 @@ MonoBehaviour:
2094 m_StringArgument: 2094 m_StringArgument:
2095 m_BoolArgument: 0 2095 m_BoolArgument: 0
2096 m_CallState: 2 2096 m_CallState: 2
2097 - - m_Target: {fileID: 0}  
2098 - m_MethodName: setRepeatLayerState  
2099 - m_Mode: 6  
2100 - m_Arguments:  
2101 - m_ObjectArgument: {fileID: 0}  
2102 - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine  
2103 - m_IntArgument: 0  
2104 - m_FloatArgument: 0  
2105 - m_StringArgument:  
2106 - m_BoolArgument: 0  
2107 - m_CallState: 2  
2108 m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, 2097 m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
2109 Culture=neutral, PublicKeyToken=null 2098 Culture=neutral, PublicKeyToken=null
2110 --- !u!114 &366095110 2099 --- !u!114 &366095110
@@ -3839,6 +3828,119 @@ MonoBehaviour: @@ -3839,6 +3828,119 @@ MonoBehaviour:
3839 m_Script: {fileID: 11500000, guid: 87b9a8a309b780346a49c0d7ad7baecb, type: 3} 3828 m_Script: {fileID: 11500000, guid: 87b9a8a309b780346a49c0d7ad7baecb, type: 3}
3840 m_Name: 3829 m_Name:
3841 m_EditorClassIdentifier: 3830 m_EditorClassIdentifier:
  3831 +--- !u!1 &581668676
  3832 +GameObject:
  3833 + m_ObjectHideFlags: 0
  3834 + m_PrefabParentObject: {fileID: 133590, guid: 5ccb0ba277304a14b9bb8d4e34161675, type: 2}
  3835 + m_PrefabInternal: {fileID: 0}
  3836 + serializedVersion: 4
  3837 + m_Component:
  3838 + - 224: {fileID: 581668677}
  3839 + - 222: {fileID: 581668680}
  3840 + - 114: {fileID: 581668679}
  3841 + - 114: {fileID: 581668678}
  3842 + m_Layer: 5
  3843 + m_Name: b_share
  3844 + m_TagString: progress
  3845 + m_Icon: {fileID: 0}
  3846 + m_NavMeshLayer: 0
  3847 + m_StaticEditorFlags: 0
  3848 + m_IsActive: 0
  3849 +--- !u!224 &581668677
  3850 +RectTransform:
  3851 + m_ObjectHideFlags: 0
  3852 + m_PrefabParentObject: {fileID: 22474260, guid: 5ccb0ba277304a14b9bb8d4e34161675,
  3853 + type: 2}
  3854 + m_PrefabInternal: {fileID: 0}
  3855 + m_GameObject: {fileID: 581668676}
  3856 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  3857 + m_LocalPosition: {x: 0, y: 0, z: 0}
  3858 + m_LocalScale: {x: 1, y: 1, z: 0}
  3859 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
  3860 + m_Children: []
  3861 + m_Father: {fileID: 1530408465}
  3862 + m_RootOrder: 5
  3863 + m_AnchorMin: {x: 0, y: 1.7}
  3864 + m_AnchorMax: {x: 0.97, y: 2.2}
  3865 + m_AnchoredPosition: {x: 0, y: 0}
  3866 + m_SizeDelta: {x: -237.39001, y: 0}
  3867 + m_Pivot: {x: 1, y: 0}
  3868 +--- !u!114 &581668678
  3869 +MonoBehaviour:
  3870 + m_ObjectHideFlags: 0
  3871 + m_PrefabParentObject: {fileID: 0}
  3872 + m_PrefabInternal: {fileID: 0}
  3873 + m_GameObject: {fileID: 581668676}
  3874 + m_Enabled: 1
  3875 + m_EditorHideFlags: 0
  3876 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
  3877 + m_Name:
  3878 + m_EditorClassIdentifier:
  3879 + m_Navigation:
  3880 + m_Mode: 3
  3881 + m_SelectOnUp: {fileID: 0}
  3882 + m_SelectOnDown: {fileID: 0}
  3883 + m_SelectOnLeft: {fileID: 0}
  3884 + m_SelectOnRight: {fileID: 0}
  3885 + m_Transition: 1
  3886 + m_Colors:
  3887 + m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
  3888 + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
  3889 + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
  3890 + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
  3891 + m_ColorMultiplier: 1
  3892 + m_FadeDuration: 0.1
  3893 + m_SpriteState:
  3894 + m_HighlightedSprite: {fileID: 0}
  3895 + m_PressedSprite: {fileID: 0}
  3896 + m_DisabledSprite: {fileID: 0}
  3897 + m_AnimationTriggers:
  3898 + m_NormalTrigger: Normal
  3899 + m_HighlightedTrigger: Highlighted
  3900 + m_PressedTrigger: Pressed
  3901 + m_DisabledTrigger: Disabled
  3902 + m_Interactable: 1
  3903 + m_TargetGraphic: {fileID: 581668679}
  3904 + m_OnClick:
  3905 + m_PersistentCalls:
  3906 + m_Calls: []
  3907 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
  3908 + Culture=neutral, PublicKeyToken=null
  3909 +--- !u!114 &581668679
  3910 +MonoBehaviour:
  3911 + m_ObjectHideFlags: 0
  3912 + m_PrefabParentObject: {fileID: 11451830, guid: 5ccb0ba277304a14b9bb8d4e34161675,
  3913 + type: 2}
  3914 + m_PrefabInternal: {fileID: 0}
  3915 + m_GameObject: {fileID: 581668676}
  3916 + m_Enabled: 1
  3917 + m_EditorHideFlags: 0
  3918 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
  3919 + m_Name:
  3920 + m_EditorClassIdentifier:
  3921 + m_Material: {fileID: 0}
  3922 + m_Color: {r: 1, g: 1, b: 1, a: 1}
  3923 + m_RaycastTarget: 1
  3924 + m_OnCullStateChanged:
  3925 + m_PersistentCalls:
  3926 + m_Calls: []
  3927 + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
  3928 + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
  3929 + m_Sprite: {fileID: 21300000, guid: 7d12ab31f4b8296418d8878fb52ca300, type: 3}
  3930 + m_Type: 0
  3931 + m_PreserveAspect: 1
  3932 + m_FillCenter: 1
  3933 + m_FillMethod: 4
  3934 + m_FillAmount: 1
  3935 + m_FillClockwise: 1
  3936 + m_FillOrigin: 0
  3937 +--- !u!222 &581668680
  3938 +CanvasRenderer:
  3939 + m_ObjectHideFlags: 0
  3940 + m_PrefabParentObject: {fileID: 22202710, guid: 5ccb0ba277304a14b9bb8d4e34161675,
  3941 + type: 2}
  3942 + m_PrefabInternal: {fileID: 0}
  3943 + m_GameObject: {fileID: 581668676}
3842 --- !u!1 &582478958 3944 --- !u!1 &582478958
3843 GameObject: 3945 GameObject:
3844 m_ObjectHideFlags: 0 3946 m_ObjectHideFlags: 0
@@ -4781,106 +4883,6 @@ MonoBehaviour: @@ -4781,106 +4883,6 @@ MonoBehaviour:
4781 m_Spacing: 52 4883 m_Spacing: 52
4782 m_ChildForceExpandWidth: 0 4884 m_ChildForceExpandWidth: 0
4783 m_ChildForceExpandHeight: 0 4885 m_ChildForceExpandHeight: 0
4784 ---- !u!1 &726443270  
4785 -GameObject:  
4786 - m_ObjectHideFlags: 0  
4787 - m_PrefabParentObject: {fileID: 127404, guid: 5ccb0ba277304a14b9bb8d4e34161675, type: 2}  
4788 - m_PrefabInternal: {fileID: 0}  
4789 - serializedVersion: 4  
4790 - m_Component:  
4791 - - 224: {fileID: 726443271}  
4792 - - 222: {fileID: 726443274}  
4793 - - 114: {fileID: 726443273}  
4794 - - 114: {fileID: 726443272}  
4795 - - 114: {fileID: 726443275}  
4796 - m_Layer: 5  
4797 - m_Name: container  
4798 - m_TagString: Untagged  
4799 - m_Icon: {fileID: 0}  
4800 - m_NavMeshLayer: 0  
4801 - m_StaticEditorFlags: 0  
4802 - m_IsActive: 1  
4803 ---- !u!224 &726443271  
4804 -RectTransform:  
4805 - m_ObjectHideFlags: 0  
4806 - m_PrefabParentObject: {fileID: 22468874, guid: 5ccb0ba277304a14b9bb8d4e34161675,  
4807 - type: 2}  
4808 - m_PrefabInternal: {fileID: 0}  
4809 - m_GameObject: {fileID: 726443270}  
4810 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}  
4811 - m_LocalPosition: {x: 0, y: 0, z: 0}  
4812 - m_LocalScale: {x: 1, y: 1, z: 0}  
4813 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}  
4814 - m_Children:  
4815 - - {fileID: 1059619783}  
4816 - - {fileID: 291722902}  
4817 - - {fileID: 160532052}  
4818 - m_Father: {fileID: 1530408465}  
4819 - m_RootOrder: 0  
4820 - m_AnchorMin: {x: 0, y: 1.1}  
4821 - m_AnchorMax: {x: 0.97, y: 1.6}  
4822 - m_AnchoredPosition: {x: 0, y: 58.5}  
4823 - m_SizeDelta: {x: 0, y: 0}  
4824 - m_Pivot: {x: 1, y: 0}  
4825 ---- !u!114 &726443272  
4826 -MonoBehaviour:  
4827 - m_ObjectHideFlags: 0  
4828 - m_PrefabParentObject: {fileID: 0}  
4829 - m_PrefabInternal: {fileID: 0}  
4830 - m_GameObject: {fileID: 726443270}  
4831 - m_Enabled: 1  
4832 - m_EditorHideFlags: 0  
4833 - m_Script: {fileID: -1254083943, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}  
4834 - m_Name:  
4835 - m_EditorClassIdentifier:  
4836 - m_AspectMode: 2  
4837 - m_AspectRatio: 1  
4838 ---- !u!114 &726443273  
4839 -MonoBehaviour:  
4840 - m_ObjectHideFlags: 0  
4841 - m_PrefabParentObject: {fileID: 11464616, guid: 5ccb0ba277304a14b9bb8d4e34161675,  
4842 - type: 2}  
4843 - m_PrefabInternal: {fileID: 0}  
4844 - m_GameObject: {fileID: 726443270}  
4845 - m_Enabled: 1  
4846 - m_EditorHideFlags: 0  
4847 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}  
4848 - m_Name:  
4849 - m_EditorClassIdentifier:  
4850 - m_Material: {fileID: 0}  
4851 - m_Color: {r: 0, g: 0, b: 0, a: 0.159}  
4852 - m_RaycastTarget: 1  
4853 - m_OnCullStateChanged:  
4854 - m_PersistentCalls:  
4855 - m_Calls: []  
4856 - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,  
4857 - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null  
4858 - m_Sprite: {fileID: 21300000, guid: cf4c75f66de96f84086cf037ef21a437, type: 3}  
4859 - m_Type: 0  
4860 - m_PreserveAspect: 1  
4861 - m_FillCenter: 1  
4862 - m_FillMethod: 4  
4863 - m_FillAmount: 1  
4864 - m_FillClockwise: 1  
4865 - m_FillOrigin: 0  
4866 ---- !u!222 &726443274  
4867 -CanvasRenderer:  
4868 - m_ObjectHideFlags: 0  
4869 - m_PrefabParentObject: {fileID: 22208740, guid: 5ccb0ba277304a14b9bb8d4e34161675,  
4870 - type: 2}  
4871 - m_PrefabInternal: {fileID: 0}  
4872 - m_GameObject: {fileID: 726443270}  
4873 ---- !u!114 &726443275  
4874 -MonoBehaviour:  
4875 - m_ObjectHideFlags: 0  
4876 - m_PrefabParentObject: {fileID: 0}  
4877 - m_PrefabInternal: {fileID: 0}  
4878 - m_GameObject: {fileID: 726443270}  
4879 - m_Enabled: 1  
4880 - m_EditorHideFlags: 0  
4881 - m_Script: {fileID: -146154839, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}  
4882 - m_Name:  
4883 - m_EditorClassIdentifier:  
4884 --- !u!1 &813876601 4886 --- !u!1 &813876601
4885 GameObject: 4887 GameObject:
4886 m_ObjectHideFlags: 0 4888 m_ObjectHideFlags: 0
@@ -4917,7 +4919,7 @@ RectTransform: @@ -4917,7 +4919,7 @@ RectTransform:
4917 m_AnchorMin: {x: 0, y: 1.1} 4919 m_AnchorMin: {x: 0, y: 1.1}
4918 m_AnchorMax: {x: 0.97, y: 1.6} 4920 m_AnchorMax: {x: 0.97, y: 1.6}
4919 m_AnchoredPosition: {x: 0, y: 0} 4921 m_AnchoredPosition: {x: 0, y: 0}
4920 - m_SizeDelta: {x: -274.61145, y: 0} 4922 + m_SizeDelta: {x: -237.39001, y: 0}
4921 m_Pivot: {x: 1, y: 0} 4923 m_Pivot: {x: 1, y: 0}
4922 --- !u!114 &813876603 4924 --- !u!114 &813876603
4923 MonoBehaviour: 4925 MonoBehaviour:
@@ -5531,7 +5533,7 @@ RectTransform: @@ -5531,7 +5533,7 @@ RectTransform:
5531 m_AnchorMin: {x: 0, y: 0} 5533 m_AnchorMin: {x: 0, y: 0}
5532 m_AnchorMax: {x: 1, y: 0} 5534 m_AnchorMax: {x: 1, y: 0}
5533 m_AnchoredPosition: {x: 0, y: 0} 5535 m_AnchoredPosition: {x: 0, y: 0}
5534 - m_SizeDelta: {x: 0, y: 94.85714} 5536 + m_SizeDelta: {x: 0, y: 82}
5535 m_Pivot: {x: 1, y: 0} 5537 m_Pivot: {x: 1, y: 0}
5536 --- !u!114 &861767966 5538 --- !u!114 &861767966
5537 MonoBehaviour: 5539 MonoBehaviour:
@@ -5960,6 +5962,119 @@ CanvasRenderer: @@ -5960,6 +5962,119 @@ CanvasRenderer:
5960 type: 2} 5962 type: 2}
5961 m_PrefabInternal: {fileID: 0} 5963 m_PrefabInternal: {fileID: 0}
5962 m_GameObject: {fileID: 930426942} 5964 m_GameObject: {fileID: 930426942}
  5965 +--- !u!1 &935965592
  5966 +GameObject:
  5967 + m_ObjectHideFlags: 0
  5968 + m_PrefabParentObject: {fileID: 133590, guid: 5ccb0ba277304a14b9bb8d4e34161675, type: 2}
  5969 + m_PrefabInternal: {fileID: 0}
  5970 + serializedVersion: 4
  5971 + m_Component:
  5972 + - 224: {fileID: 935965593}
  5973 + - 222: {fileID: 935965596}
  5974 + - 114: {fileID: 935965595}
  5975 + - 114: {fileID: 935965594}
  5976 + m_Layer: 5
  5977 + m_Name: b_close
  5978 + m_TagString: progress
  5979 + m_Icon: {fileID: 0}
  5980 + m_NavMeshLayer: 0
  5981 + m_StaticEditorFlags: 0
  5982 + m_IsActive: 0
  5983 +--- !u!224 &935965593
  5984 +RectTransform:
  5985 + m_ObjectHideFlags: 0
  5986 + m_PrefabParentObject: {fileID: 22474260, guid: 5ccb0ba277304a14b9bb8d4e34161675,
  5987 + type: 2}
  5988 + m_PrefabInternal: {fileID: 0}
  5989 + m_GameObject: {fileID: 935965592}
  5990 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  5991 + m_LocalPosition: {x: 0, y: 0, z: 0}
  5992 + m_LocalScale: {x: 1, y: 1, z: 0}
  5993 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
  5994 + m_Children: []
  5995 + m_Father: {fileID: 1530408465}
  5996 + m_RootOrder: 4
  5997 + m_AnchorMin: {x: 0, y: 1.7}
  5998 + m_AnchorMax: {x: 0.97, y: 2.2}
  5999 + m_AnchoredPosition: {x: 0, y: 0}
  6000 + m_SizeDelta: {x: -237.39001, y: 0}
  6001 + m_Pivot: {x: 1, y: 0}
  6002 +--- !u!114 &935965594
  6003 +MonoBehaviour:
  6004 + m_ObjectHideFlags: 0
  6005 + m_PrefabParentObject: {fileID: 0}
  6006 + m_PrefabInternal: {fileID: 0}
  6007 + m_GameObject: {fileID: 935965592}
  6008 + m_Enabled: 1
  6009 + m_EditorHideFlags: 0
  6010 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
  6011 + m_Name:
  6012 + m_EditorClassIdentifier:
  6013 + m_Navigation:
  6014 + m_Mode: 3
  6015 + m_SelectOnUp: {fileID: 0}
  6016 + m_SelectOnDown: {fileID: 0}
  6017 + m_SelectOnLeft: {fileID: 0}
  6018 + m_SelectOnRight: {fileID: 0}
  6019 + m_Transition: 1
  6020 + m_Colors:
  6021 + m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
  6022 + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
  6023 + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
  6024 + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
  6025 + m_ColorMultiplier: 1
  6026 + m_FadeDuration: 0.1
  6027 + m_SpriteState:
  6028 + m_HighlightedSprite: {fileID: 0}
  6029 + m_PressedSprite: {fileID: 0}
  6030 + m_DisabledSprite: {fileID: 0}
  6031 + m_AnimationTriggers:
  6032 + m_NormalTrigger: Normal
  6033 + m_HighlightedTrigger: Highlighted
  6034 + m_PressedTrigger: Pressed
  6035 + m_DisabledTrigger: Disabled
  6036 + m_Interactable: 1
  6037 + m_TargetGraphic: {fileID: 935965595}
  6038 + m_OnClick:
  6039 + m_PersistentCalls:
  6040 + m_Calls: []
  6041 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
  6042 + Culture=neutral, PublicKeyToken=null
  6043 +--- !u!114 &935965595
  6044 +MonoBehaviour:
  6045 + m_ObjectHideFlags: 0
  6046 + m_PrefabParentObject: {fileID: 11451830, guid: 5ccb0ba277304a14b9bb8d4e34161675,
  6047 + type: 2}
  6048 + m_PrefabInternal: {fileID: 0}
  6049 + m_GameObject: {fileID: 935965592}
  6050 + m_Enabled: 1
  6051 + m_EditorHideFlags: 0
  6052 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
  6053 + m_Name:
  6054 + m_EditorClassIdentifier:
  6055 + m_Material: {fileID: 0}
  6056 + m_Color: {r: 1, g: 1, b: 1, a: 1}
  6057 + m_RaycastTarget: 1
  6058 + m_OnCullStateChanged:
  6059 + m_PersistentCalls:
  6060 + m_Calls: []
  6061 + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
  6062 + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
  6063 + m_Sprite: {fileID: 21300000, guid: 6495de8ff9a26c94e9d42fada0a56630, type: 3}
  6064 + m_Type: 0
  6065 + m_PreserveAspect: 1
  6066 + m_FillCenter: 1
  6067 + m_FillMethod: 4
  6068 + m_FillAmount: 1
  6069 + m_FillClockwise: 1
  6070 + m_FillOrigin: 0
  6071 +--- !u!222 &935965596
  6072 +CanvasRenderer:
  6073 + m_ObjectHideFlags: 0
  6074 + m_PrefabParentObject: {fileID: 22202710, guid: 5ccb0ba277304a14b9bb8d4e34161675,
  6075 + type: 2}
  6076 + m_PrefabInternal: {fileID: 0}
  6077 + m_GameObject: {fileID: 935965592}
5963 --- !u!1 &948041467 6078 --- !u!1 &948041467
5964 GameObject: 6079 GameObject:
5965 m_ObjectHideFlags: 0 6080 m_ObjectHideFlags: 0
@@ -7019,7 +7134,7 @@ GameObject: @@ -7019,7 +7134,7 @@ GameObject:
7019 - 114: {fileID: 1059619785} 7134 - 114: {fileID: 1059619785}
7020 - 114: {fileID: 1059619784} 7135 - 114: {fileID: 1059619784}
7021 m_Layer: 5 7136 m_Layer: 5
7022 - m_Name: b_share 7137 + m_Name: b_export
7023 m_TagString: b_share 7138 m_TagString: b_share
7024 m_Icon: {fileID: 0} 7139 m_Icon: {fileID: 0}
7025 m_NavMeshLayer: 0 7140 m_NavMeshLayer: 0
@@ -7034,16 +7149,16 @@ RectTransform: @@ -7034,16 +7149,16 @@ RectTransform:
7034 m_GameObject: {fileID: 1059619782} 7149 m_GameObject: {fileID: 1059619782}
7035 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 7150 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
7036 m_LocalPosition: {x: 0, y: 0, z: 0} 7151 m_LocalPosition: {x: 0, y: 0, z: 0}
7037 - m_LocalScale: {x: 1, y: 1, z: 1} 7152 + m_LocalScale: {x: 1, y: 1, z: 0}
7038 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 7153 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
7039 m_Children: [] 7154 m_Children: []
7040 - m_Father: {fileID: 726443271} 7155 + m_Father: {fileID: 1530408465}
7041 m_RootOrder: 0 7156 m_RootOrder: 0
7042 - m_AnchorMin: {x: 0.2, y: 0.22}  
7043 - m_AnchorMax: {x: 0.8, y: 0.8} 7157 + m_AnchorMin: {x: 0, y: 1.7}
  7158 + m_AnchorMax: {x: 0.97, y: 2.2}
7044 m_AnchoredPosition: {x: 0, y: 0} 7159 m_AnchoredPosition: {x: 0, y: 0}
7045 - m_SizeDelta: {x: 20, y: 20}  
7046 - m_Pivot: {x: 0.5, y: 0.5} 7160 + m_SizeDelta: {x: 0, y: 0}
  7161 + m_Pivot: {x: 1, y: 0}
7047 --- !u!114 &1059619784 7162 --- !u!114 &1059619784
7048 MonoBehaviour: 7163 MonoBehaviour:
7049 m_ObjectHideFlags: 0 7164 m_ObjectHideFlags: 0
@@ -7084,19 +7199,8 @@ MonoBehaviour: @@ -7084,19 +7199,8 @@ MonoBehaviour:
7084 m_OnClick: 7199 m_OnClick:
7085 m_PersistentCalls: 7200 m_PersistentCalls:
7086 m_Calls: 7201 m_Calls:
7087 - - m_Target: {fileID: 578311381}  
7088 - m_MethodName:  
7089 - m_Mode: 1  
7090 - m_Arguments:  
7091 - m_ObjectArgument: {fileID: 0}  
7092 - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine  
7093 - m_IntArgument: 0  
7094 - m_FloatArgument: 0  
7095 - m_StringArgument:  
7096 - m_BoolArgument: 0  
7097 - m_CallState: 2  
7098 - m_Target: {fileID: 210788816} 7202 - m_Target: {fileID: 210788816}
7099 - m_MethodName: onClickShare 7203 + m_MethodName: onClickExport
7100 m_Mode: 1 7204 m_Mode: 1
7101 m_Arguments: 7205 m_Arguments:
7102 m_ObjectArgument: {fileID: 0} 7206 m_ObjectArgument: {fileID: 0}
@@ -11007,7 +11111,12 @@ RectTransform: @@ -11007,7 +11111,12 @@ RectTransform:
11007 m_LocalScale: {x: 1, y: 1, z: 1} 11111 m_LocalScale: {x: 1, y: 1, z: 1}
11008 m_LocalEulerAnglesHint: {x: 0, y: 0.92300004, z: 0} 11112 m_LocalEulerAnglesHint: {x: 0, y: 0.92300004, z: 0}
11009 m_Children: 11113 m_Children:
11010 - - {fileID: 726443271} 11114 + - {fileID: 1059619783}
  11115 + - {fileID: 291722902}
  11116 + - {fileID: 160532052}
  11117 + - {fileID: 1910480222}
  11118 + - {fileID: 935965593}
  11119 + - {fileID: 581668677}
11011 m_Father: {fileID: 1620867682} 11120 m_Father: {fileID: 1620867682}
11012 m_RootOrder: 4 11121 m_RootOrder: 4
11013 m_AnchorMin: {x: 0, y: 0} 11122 m_AnchorMin: {x: 0, y: 0}
@@ -13006,6 +13115,77 @@ CanvasRenderer: @@ -13006,6 +13115,77 @@ CanvasRenderer:
13006 m_PrefabParentObject: {fileID: 0} 13115 m_PrefabParentObject: {fileID: 0}
13007 m_PrefabInternal: {fileID: 0} 13116 m_PrefabInternal: {fileID: 0}
13008 m_GameObject: {fileID: 1878890614} 13117 m_GameObject: {fileID: 1878890614}
  13118 +--- !u!1 &1910480221
  13119 +GameObject:
  13120 + m_ObjectHideFlags: 0
  13121 + m_PrefabParentObject: {fileID: 133590, guid: 5ccb0ba277304a14b9bb8d4e34161675, type: 2}
  13122 + m_PrefabInternal: {fileID: 0}
  13123 + serializedVersion: 4
  13124 + m_Component:
  13125 + - 224: {fileID: 1910480222}
  13126 + - 222: {fileID: 1910480224}
  13127 + - 114: {fileID: 1910480223}
  13128 + m_Layer: 5
  13129 + m_Name: b_progress_download
  13130 + m_TagString: progress
  13131 + m_Icon: {fileID: 0}
  13132 + m_NavMeshLayer: 0
  13133 + m_StaticEditorFlags: 0
  13134 + m_IsActive: 0
  13135 +--- !u!224 &1910480222
  13136 +RectTransform:
  13137 + m_ObjectHideFlags: 0
  13138 + m_PrefabParentObject: {fileID: 22474260, guid: 5ccb0ba277304a14b9bb8d4e34161675,
  13139 + type: 2}
  13140 + m_PrefabInternal: {fileID: 0}
  13141 + m_GameObject: {fileID: 1910480221}
  13142 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  13143 + m_LocalPosition: {x: 0, y: 0, z: 0}
  13144 + m_LocalScale: {x: 1, y: 1, z: 0}
  13145 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
  13146 + m_Children: []
  13147 + m_Father: {fileID: 1530408465}
  13148 + m_RootOrder: 3
  13149 + m_AnchorMin: {x: 0, y: 1.7}
  13150 + m_AnchorMax: {x: 0.97, y: 2.2}
  13151 + m_AnchoredPosition: {x: 0, y: 0}
  13152 + m_SizeDelta: {x: -237.39001, y: 0}
  13153 + m_Pivot: {x: 1, y: 0}
  13154 +--- !u!114 &1910480223
  13155 +MonoBehaviour:
  13156 + m_ObjectHideFlags: 0
  13157 + m_PrefabParentObject: {fileID: 11451830, guid: 5ccb0ba277304a14b9bb8d4e34161675,
  13158 + type: 2}
  13159 + m_PrefabInternal: {fileID: 0}
  13160 + m_GameObject: {fileID: 1910480221}
  13161 + m_Enabled: 1
  13162 + m_EditorHideFlags: 0
  13163 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
  13164 + m_Name:
  13165 + m_EditorClassIdentifier:
  13166 + m_Material: {fileID: 0}
  13167 + m_Color: {r: 1, g: 1, b: 1, a: 1}
  13168 + m_RaycastTarget: 1
  13169 + m_OnCullStateChanged:
  13170 + m_PersistentCalls:
  13171 + m_Calls: []
  13172 + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
  13173 + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
  13174 + m_Sprite: {fileID: 21300000, guid: 1bddd19230af9fa498166ff735ac072e, type: 3}
  13175 + m_Type: 3
  13176 + m_PreserveAspect: 1
  13177 + m_FillCenter: 1
  13178 + m_FillMethod: 4
  13179 + m_FillAmount: 1
  13180 + m_FillClockwise: 1
  13181 + m_FillOrigin: 0
  13182 +--- !u!222 &1910480224
  13183 +CanvasRenderer:
  13184 + m_ObjectHideFlags: 0
  13185 + m_PrefabParentObject: {fileID: 22202710, guid: 5ccb0ba277304a14b9bb8d4e34161675,
  13186 + type: 2}
  13187 + m_PrefabInternal: {fileID: 0}
  13188 + m_GameObject: {fileID: 1910480221}
13009 --- !u!1 &1920630438 13189 --- !u!1 &1920630438
13010 GameObject: 13190 GameObject:
13011 m_ObjectHideFlags: 0 13191 m_ObjectHideFlags: 0
@@ -15531,10 +15711,13 @@ MonoBehaviour: @@ -15531,10 +15711,13 @@ MonoBehaviour:
15531 connectionErrorText: {fileID: 163763091} 15711 connectionErrorText: {fileID: 163763091}
15532 pauseMenu: {fileID: 1024302431} 15712 pauseMenu: {fileID: 1024302431}
15533 repeatLayer: {fileID: 861767964} 15713 repeatLayer: {fileID: 861767964}
15534 - exportLayer: {fileID: 1530408464}  
15535 - shareLayer: {fileID: 1059619782} 15714 + exportContainer: {fileID: 1530408464}
  15715 + exportLayer: {fileID: 1059619782}
  15716 + shareLayer: {fileID: 581668676}
15536 progressLayer: {fileID: 291722901} 15717 progressLayer: {fileID: 291722901}
15537 downloadLayer: {fileID: 160532051} 15718 downloadLayer: {fileID: 160532051}
  15719 + downloadProgressLayer: {fileID: 1910480221}
  15720 + closeLayer: {fileID: 935965592}
15538 textButton: {fileID: 930426942} 15721 textButton: {fileID: 930426942}
15539 pauseButton: {fileID: 440527253} 15722 pauseButton: {fileID: 440527253}
15540 avatarCollider: {fileID: 535548073} 15723 avatarCollider: {fileID: 535548073}
Assets/Scripts/Export Video.meta 0 → 100644
@@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
  1 +fileFormatVersion: 2
  2 +guid: f216d4c66e9161145a0e331580587b23
  3 +folderAsset: yes
  4 +timeCreated: 1485776251
  5 +licenseType: Free
  6 +DefaultImporter:
  7 + userData:
  8 + assetBundleName:
  9 + assetBundleVariant:
Assets/Scripts/Export Video/ExportLayers.cs 0 → 100644
@@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
  1 +using UnityEngine;
  2 +using System.Collections;
  3 +
  4 +public class ExportLayers{
  5 +
  6 + public enum ExportLayer
  7 + {
  8 + Export_Layer,
  9 + Download_Layer,
  10 + Progress_Layer,
  11 + Share_Layer,
  12 + Progress_Download_Layer,
  13 + All
  14 + }
  15 +}
Assets/Scripts/Export Video/ExportLayers.cs.meta 0 → 100644
@@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
  1 +fileFormatVersion: 2
  2 +guid: 40f7e1d335fae91448fac7d7b4880ed5
  3 +timeCreated: 1485731549
  4 +licenseType: Free
  5 +MonoImporter:
  6 + serializedVersion: 2
  7 + defaultReferences: []
  8 + executionOrder: 0
  9 + icon: {instanceID: 0}
  10 + userData:
  11 + assetBundleName:
  12 + assetBundleVariant:
Assets/Scripts/Export Video/ExportVideo.cs 0 → 100644
@@ -0,0 +1,197 @@ @@ -0,0 +1,197 @@
  1 +/**********************
  2 +********LAVID**********
  3 +***VLibras Project*****
  4 +*------------------------------------------------------------------------
  5 +*Description:
  6 +*
  7 +*This class needs an android plugin to call Dialogs Mobile APIs, working on both
  8 +* And IOS platforms.
  9 +* Export Video is responsible for making available the share video functionality.
  10 +*It works managing the button layers related to the funcionality and also making
  11 +* requests to VLibras server.
  12 +*---------------------------------------------------------------------------
  13 +*Plugin directory:
  14 +* - Assets/Plugins/Android
  15 +*References:
  16 +* - http://docs.unity3d.com/ScriptReference/AndroidJavaClass.html
  17 +*------------------------------------------------------------------------
  18 +*Author: Thiago Filipe
  19 +*thiago.filipe@lavid.ufpb.br
  20 +***********************/
  21 +
  22 +
  23 +using UnityEngine;
  24 +using System;
  25 +using System.Collections;
  26 +using LAViD.Unity.Utils;
  27 +
  28 +
  29 +public class ExportVideo : MonoBehaviour {
  30 +
  31 +
  32 + public ScreenManager screenManager;
  33 + private MobileNativeDialog nativeDialog;
  34 +
  35 + public static string gloss = "";
  36 + private const string SERVER_URL = "http://traducao.vlibras.gov.br/translate?text=";
  37 +
  38 + private string title = "Download";
  39 + private string message = "Para compartilhar é preciso realizar o download do vídeo. Informação 1: N mb.";
  40 + private string yesOp = "DOWNLOAD";
  41 + private string noOp = "CANCELAR";
  42 + private string videoSize = "";
  43 +
  44 +
  45 +
  46 +
  47 + /* Function that hides the export button and
  48 + * shows the progress bar while getting video info*/
  49 +
  50 + public void onClickExport()
  51 + {
  52 +
  53 + Debug.Log("onClickShare pressed");
  54 + screenManager.changeExportStates(ExportLayers.ExportLayer.Export_Layer,false);
  55 + screenManager.changeExportStates(ExportLayers.ExportLayer.Progress_Layer, true);
  56 +
  57 +
  58 + Debug.Log("Hiding export button and showing progress loading");
  59 +
  60 + }
  61 +
  62 + /* Function that gets called by the web request
  63 + * hiding the progress bar and showing the download
  64 + * button*/
  65 + public void OnFinishGetVideoInfo()
  66 + {
  67 + Debug.Log("Video is ready to be downloaded");
  68 + screenManager.changeExportStates(ExportLayers.ExportLayer.Progress_Layer, false);
  69 + screenManager.changeExportStates(ExportLayers.ExportLayer.Download_Layer, true);
  70 + Debug.Log("Hiding progress loading and showing download button");
  71 +
  72 + }
  73 +
  74 + /* Function that asks the user whether downlaod or not
  75 + * the video by presenting a Dialog Box.**/
  76 + public void onDownloadClick()
  77 + {
  78 +
  79 + Debug.Log("Asking for permition to download");
  80 + nativeDialog = new MobileNativeDialog(title, message, yesOp, noOp);
  81 + nativeDialog.OnComplete = OnComplete;
  82 +
  83 +
  84 +
  85 +
  86 + }
  87 +
  88 + /** Delegate function which waits for YES or NO from the MobileDialog
  89 + * and attach a action to each option**/
  90 +
  91 + public void OnComplete(MNDialogResult result)
  92 + {
  93 + if(result == MNDialogResult.YES)
  94 + {
  95 + Debug.Log("User pressed yes");
  96 + }else if(result == MNDialogResult.NO)
  97 + {
  98 + Debug.Log("User pressed no");
  99 + screenManager.changeExportStates(ExportLayers.ExportLayer.All, false);
  100 + screenManager.changeExportStates(ExportLayers.ExportLayer.Export_Layer, true);
  101 + }
  102 + }
  103 +
  104 + /* Function that shares the video downloaded.**/
  105 +
  106 + public void OnDownloadFinished()
  107 + {
  108 + Debug.Log("Download has finished. Setting layer to Share Layer");
  109 + screenManager.changeExportStates(ExportLayers.ExportLayer.Progress_Download_Layer, false);
  110 + screenManager.changeExportStates(ExportLayers.ExportLayer.Share_Layer, true);
  111 + }
  112 +
  113 +
  114 + private IEnumerator requestVideoInfo(string gloss)
  115 + {
  116 +
  117 +
  118 + WWW videoInfoRequest = new WWW(SERVER_URL + WWW.EscapeURL(gloss));
  119 +
  120 +
  121 + PlayerLogger.Log("PM", "t", "Gloss: " + gloss);
  122 + PlayerLogger.Log("PM", "t", "Request: " + SERVER_URL + WWW.EscapeURL(gloss));
  123 +
  124 + yield return WaitForResponse(videoInfoRequest);
  125 +
  126 + try
  127 + {
  128 + if (!videoInfoRequest.isDone)
  129 + {
  130 + this.screenManager.showConnectionErrorDialog(
  131 + PlayerManager.ERROR_STATUS_MESSAGE.CONNECTION_TIMEOUT_FAILURE);
  132 +
  133 + PlayerLogger.Log("PM", "t", "Timeout.");
  134 + }
  135 + else if (videoInfoRequest.error != null)
  136 + {
  137 + this.screenManager.showConnectionErrorDialog(
  138 + PlayerManager.ERROR_STATUS_MESSAGE.INTERNET_CONNECTION_FAILURE);
  139 +
  140 + PlayerLogger.Log("PM", "t", "(WWW) Error: " + videoInfoRequest.error);
  141 + }
  142 + else if (videoInfoRequest.responseHeaders.Count == 0)
  143 + {
  144 + PlayerLogger.Log("PM", "t", "Unsuccessful answer (0).");
  145 +
  146 + this.screenManager.showConnectionErrorDialog(
  147 + PlayerManager.ERROR_STATUS_MESSAGE.TRANSLATOR_CONNECTION_FAILURE);
  148 + }
  149 + else if (!videoInfoRequest.responseHeaders["STATUS"].Contains("200"))
  150 + {
  151 + PlayerLogger.Log("PM", "t", "Unsuccessful answer (" + videoInfoRequest.responseHeaders["STATUS"] + ").");
  152 +
  153 + this.screenManager.showConnectionErrorDialog(
  154 + PlayerManager.ERROR_STATUS_MESSAGE.TRANSLATOR_CONNECTION_FAILURE);
  155 + }
  156 + else if (String.IsNullOrEmpty(videoInfoRequest.text))
  157 + {
  158 + PlayerLogger.Log("PM", "t", "Empty answer.");
  159 + }
  160 + else
  161 + {
  162 + PlayerLogger.Log("PM", "t", "Answer: " + videoInfoRequest.text);
  163 +
  164 + gloss = videoInfoRequest.text;
  165 +
  166 +
  167 +
  168 +
  169 + yield break;
  170 + }
  171 +
  172 +
  173 + }
  174 + finally
  175 + {
  176 +
  177 +
  178 +
  179 + }
  180 + }
  181 +
  182 + public IEnumerator WaitForResponse(WWW www, Events.RequestSuccess success, Events.RequestError error)
  183 + {
  184 + yield return Methods.WaitForResponse(www, 20f, success, error);
  185 +
  186 + }
  187 +
  188 + protected IEnumerator WaitForResponse(WWW www)
  189 + {
  190 + yield return WaitForResponse(www, null, null);
  191 + }
  192 +
  193 +
  194 +
  195 +
  196 +
  197 +}
Assets/Scripts/Export Video/ExportVideo.cs.meta 0 → 100644
@@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
  1 +fileFormatVersion: 2
  2 +guid: dfd8bc2e1d5564642b758cc106a78de2
  3 +timeCreated: 1485619912
  4 +licenseType: Free
  5 +MonoImporter:
  6 + serializedVersion: 2
  7 + defaultReferences: []
  8 + executionOrder: 0
  9 + icon: {instanceID: 0}
  10 + userData:
  11 + assetBundleName:
  12 + assetBundleVariant:
Assets/Scripts/Export Video/MediaShareAndroid.cs 0 → 100644
@@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
  1 +using UnityEngine;
  2 +using System.Collections;
  3 +
  4 +public class MediaShareAndroid {
  5 +
  6 + private static AndroidJavaObject activity = null;
  7 +
  8 + private static void CreateActivity()
  9 + {
  10 +#if UNITY_ANDROID && !UNITY_EDITOR
  11 + if(activity == null)
  12 + activity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").
  13 + GetStatic<AndroidJavaObject>("currentActivity");
  14 +#endif
  15 +
  16 + }
  17 +
  18 + public static void ShareActivity(string title, string subject, string body)
  19 + {
  20 + CreateActivity();
  21 + AndroidJavaObject sharingIntent = new AndroidJavaObject("android.content.Intent", "android.intent.action.SEND")
  22 + .Call<AndroidJavaObject>("setType", "text/plain")
  23 + .Call<AndroidJavaObject>("putExtra", "android.intent.extra.TEXT", body)
  24 + .Call<AndroidJavaObject>("putExtra", "android.intent.extra.SUBJECT", subject);
  25 +
  26 + AndroidJavaObject intent = new AndroidJavaObject("android.content.Intent", activity)
  27 + .CallStatic<AndroidJavaObject>("createChooser", sharingIntent, title);
  28 + activity.Call("startActivity", intent);
  29 + }
  30 +}
Assets/Scripts/Export Video/MediaShareAndroid.cs.meta 0 → 100644
@@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
  1 +fileFormatVersion: 2
  2 +guid: fd1b12a178cf08b4284859e93194c7a4
  3 +timeCreated: 1485791307
  4 +licenseType: Free
  5 +MonoImporter:
  6 + serializedVersion: 2
  7 + defaultReferences: []
  8 + executionOrder: 0
  9 + icon: {instanceID: 0}
  10 + userData:
  11 + assetBundleName:
  12 + assetBundleVariant:
Assets/Scripts/ExportVideo.cs
@@ -1,88 +0,0 @@ @@ -1,88 +0,0 @@
1 -/**********************  
2 -********LAVID**********  
3 -***VLibras Project*****  
4 -*------------------------------------------------------------------------  
5 -*Description:  
6 -*  
7 -*This class needs an android plugin to call Dialogs Mobile APIs, working on both  
8 -* And IOS platforms.  
9 -* Export Video is responsible for making available the share video functionality.  
10 -*It works managing the button layers related to the funcionality and also making  
11 -* requests to VLibras server.  
12 -*---------------------------------------------------------------------------  
13 -*Plugin directory:  
14 -* - Assets/Plugins/Android  
15 -*References:  
16 -* - http://docs.unity3d.com/ScriptReference/AndroidJavaClass.html  
17 -*------------------------------------------------------------------------  
18 -*Author: Thiago Filipe  
19 -*thiago.filipe@lavid.ufpb.br  
20 -***********************/  
21 -  
22 -  
23 -using UnityEngine;  
24 -using System.Collections;  
25 -  
26 -public class ExportVideo : MonoBehaviour {  
27 -  
28 - public ScreenManager screenManager;  
29 - private MobileNativeDialog nativeDialog;  
30 -  
31 -  
32 - private string title = "Download";  
33 - private string message = "Para compartilhar é preciso realizar o download do vídeo. Informação 1: N mb.";  
34 - private string yesOp = "DOWNLOAD";  
35 - private string noOp = "CANCELAR";  
36 - private string videoSize = "";  
37 -  
38 -  
39 -  
40 - public void onClickShare()  
41 - {  
42 - Debug.Log("onClickShare pressed");  
43 - screenManager.changeExportStates(false, true,false);  
44 - Debug.Log("Hiding export button and showing progress loading");  
45 -  
46 - }  
47 -  
48 - public void OnFinishGetVideoInfo()  
49 - {  
50 - Debug.Log("Video is ready to be downloaded");  
51 - screenManager.changeExportStates(false, false, true);  
52 - Debug.Log("Hiding progress loading and showing download button");  
53 -  
54 - }  
55 -  
56 -  
57 - public void onDownloadClick()  
58 - {  
59 -  
60 - Debug.Log("Asking for permition to download");  
61 - nativeDialog = new MobileNativeDialog(title, message, yesOp, noOp);  
62 - nativeDialog.OnComplete = OnComplete;  
63 -  
64 -  
65 -  
66 -  
67 - }  
68 -  
69 - /** Delegate function which waits for YES or NO from the MobileDialog  
70 - * and attach a action to each option**/  
71 -  
72 - public void OnComplete(MNDialogResult result)  
73 - {  
74 - if(result == MNDialogResult.YES)  
75 - {  
76 - Debug.Log("User pressed yes");  
77 - }else if(result == MNDialogResult.NO)  
78 - {  
79 - Debug.Log("User pressed no");  
80 - screenManager.changeExportStates(true, false, false);  
81 - }  
82 - }  
83 -  
84 -  
85 -  
86 -  
87 -  
88 -}  
Assets/Scripts/ExportVideo.cs.meta
@@ -1,12 +0,0 @@ @@ -1,12 +0,0 @@
1 -fileFormatVersion: 2  
2 -guid: dfd8bc2e1d5564642b758cc106a78de2  
3 -timeCreated: 1485619912  
4 -licenseType: Free  
5 -MonoImporter:  
6 - serializedVersion: 2  
7 - defaultReferences: []  
8 - executionOrder: 0  
9 - icon: {instanceID: 0}  
10 - userData:  
11 - assetBundleName:  
12 - assetBundleVariant:  
Assets/Scripts/PlayerManager.cs
@@ -45,6 +45,9 @@ public class PlayerManager : GenericPlayerManager { @@ -45,6 +45,9 @@ public class PlayerManager : GenericPlayerManager {
45 private string regionPath = ""; 45 private string regionPath = "";
46 private int regionHash = 1; 46 private int regionHash = 1;
47 private Trie signs = null; 47 private Trie signs = null;
  48 +
  49 +
  50 +
48 51
49 public static string get_connection_status_message(ERROR_STATUS_MESSAGE msg) 52 public static string get_connection_status_message(ERROR_STATUS_MESSAGE msg)
50 { 53 {
@@ -89,6 +92,7 @@ public class PlayerManager : GenericPlayerManager { @@ -89,6 +92,7 @@ public class PlayerManager : GenericPlayerManager {
89 this.dictWord = word; 92 this.dictWord = word;
90 base.gloss = word; 93 base.gloss = word;
91 base.playNow(word); 94 base.playNow(word);
  95 + ExportVideo.gloss = word;
92 96
93 this.screenManager.hideScreen(); 97 this.screenManager.hideScreen();
94 this.screenManager.setPauseMenuState(false); 98 this.screenManager.setPauseMenuState(false);
@@ -272,7 +276,8 @@ public class PlayerManager : GenericPlayerManager { @@ -272,7 +276,8 @@ public class PlayerManager : GenericPlayerManager {
272 gloss = glossRequest.text; 276 gloss = glossRequest.text;
273 277
274 base.gloss = gloss; 278 base.gloss = gloss;
275 - base.playNow(base.gloss); 279 + ExportVideo.gloss = gloss;
  280 + base.playNow(base.gloss);
276 281
277 282
278 yield break; 283 yield break;
Assets/Scripts/UI/ScreenManager.cs
@@ -25,10 +25,14 @@ public class ScreenManager : MonoBehaviour { @@ -25,10 +25,14 @@ public class ScreenManager : MonoBehaviour {
25 public Text connectionErrorText; 25 public Text connectionErrorText;
26 public GameObject pauseMenu; 26 public GameObject pauseMenu;
27 public GameObject repeatLayer; 27 public GameObject repeatLayer;
  28 + public GameObject exportContainer;
28 public GameObject exportLayer; 29 public GameObject exportLayer;
29 public GameObject shareLayer; 30 public GameObject shareLayer;
30 public GameObject progressLayer; 31 public GameObject progressLayer;
31 public GameObject downloadLayer; 32 public GameObject downloadLayer;
  33 + public GameObject downloadProgressLayer;
  34 + public GameObject closeLayer;
  35 + private bool onLockExport = false;
32 36
33 37
34 38
@@ -275,11 +279,16 @@ public class ScreenManager : MonoBehaviour { @@ -275,11 +279,16 @@ public class ScreenManager : MonoBehaviour {
275 this.repeatLayer.SetActive(active); 279 this.repeatLayer.SetActive(active);
276 } 280 }
277 281
278 - public void setShareLayerState(bool active) 282 + public void setExportContainerState(bool active)
  283 + {
  284 + this.exportContainer.SetActive(active);
  285 + }
  286 +
  287 + public void setExportLayerState(bool active)
279 288
280 { 289 {
281 290
282 - this.shareLayer.SetActive(active); 291 + this.exportLayer.SetActive(active);
283 } 292 }
284 293
285 public void setProgressLayerState(bool active) 294 public void setProgressLayerState(bool active)
@@ -295,6 +304,18 @@ public class ScreenManager : MonoBehaviour { @@ -295,6 +304,18 @@ public class ScreenManager : MonoBehaviour {
295 this.downloadLayer.SetActive(active); 304 this.downloadLayer.SetActive(active);
296 } 305 }
297 306
  307 + public void setDownloadProgressLayerState(bool active)
  308 + {
  309 + this.downloadProgressLayer.SetActive(active);
  310 + this.closeLayer.SetActive(active);
  311 + }
  312 +
  313 + public void setShareLayerState(bool active)
  314 + {
  315 +
  316 + this.shareLayer.SetActive(active);
  317 + }
  318 +
298 public void setTranslateButtonActive(bool active) 319 public void setTranslateButtonActive(bool active)
299 { 320 {
300 this.textButton.SetActive(active); 321 this.textButton.SetActive(active);
@@ -307,23 +328,54 @@ public class ScreenManager : MonoBehaviour { @@ -307,23 +328,54 @@ public class ScreenManager : MonoBehaviour {
307 setTranslateButtonActive( ! playing); 328 setTranslateButtonActive( ! playing);
308 setPauseMenuState(playing && paused); 329 setPauseMenuState(playing && paused);
309 setRepeatLayerState( ! playing && repeatable); 330 setRepeatLayerState( ! playing && repeatable);
310 - changeExportStates(!playing && repeatable, false, false); 331 + if(!onLockExport)
  332 + changeExportStates(ExportLayers.ExportLayer.Export_Layer, !playing && repeatable);
311 333
312 334
313 this.pauseButtonImage.switchAttribute(playing && paused); 335 this.pauseButtonImage.switchAttribute(playing && paused);
314 } 336 }
315 337
316 - public void changeExportStates(bool share, bool progress,bool download)  
317 - {  
318 - if(!share && !progress && !download)  
319 - {  
320 - exportLayer.SetActive(false);  
321 - }else 338 + public void changeExportStates(ExportLayers.ExportLayer layers, bool show_Layer)
  339 + {
  340 + switch (layers)
322 { 341 {
323 - exportLayer.SetActive(true);  
324 - setShareLayerState(share);  
325 - setProgressLayerState(progress);  
326 - setDownloadLayerState(download); 342 + case ExportLayers.ExportLayer.Export_Layer:
  343 + onLockExport = false;
  344 + setExportContainerState(show_Layer);
  345 + setExportLayerState(show_Layer);
  346 + break;
  347 + case ExportLayers.ExportLayer.Progress_Layer:
  348 + onLockExport = true;
  349 + setExportContainerState(show_Layer);
  350 + setProgressLayerState(show_Layer);
  351 + break;
  352 + case ExportLayers.ExportLayer.Download_Layer:
  353 + onLockExport = true;
  354 + setExportContainerState(show_Layer);
  355 + setDownloadLayerState(show_Layer);
  356 + break;
  357 + case ExportLayers.ExportLayer.Progress_Download_Layer:
  358 + onLockExport = true;
  359 + setExportContainerState(show_Layer);
  360 + setDownloadProgressLayerState(show_Layer);
  361 +
  362 + break;
  363 + case ExportLayers.ExportLayer.Share_Layer:
  364 + onLockExport = true;
  365 + setExportContainerState(show_Layer);
  366 + setShareLayerState(show_Layer);
  367 + break;
  368 + default:
  369 + onLockExport = false;
  370 + setExportContainerState(false);
  371 + setExportLayerState(false);
  372 + setProgressLayerState(false);
  373 + setDownloadLayerState(false);
  374 + setShareLayerState(false);
  375 + break;
  376 +
  377 +
  378 +
327 } 379 }
328 380
329 381