Example:
Added a new sheet and put the push down list on it
First, select the whole row
Data>Data validation
Change the Cell Range to C2:C
which means the formula will excluded the row 1(header)
Click on Criteria box
Choose the list sheet
Highlight the whole row which you want to able to select in the pull down menu, and changed to TaskConstantList!B2:B to skip the header

convert sha-1 hash (from google) to base64 hash for facebook

install xxd in centos
yum install vim-common

echo 33:4E:48:84:19:50:3A:1F:63:A6:0F:F6:A1:C2:31:E5:01:38:55:2E | xxd -r -p | openssl base64

Output:
M05IhBlQOh9jpg/2ocIx5QE4VS4=

copy this to facebook console

~ gitbook command ~

Post on (2019.09.16) |gitbook | No Comments

cd to the project folder
cd /Users/xxx/GitBook/Library/Import/project

checking
gitbook serve .

PDF
gitbook pdf .

gen html
gitbook build . –output=./html

1)clean project rebuild

2)restart android studio

3)File->Invalidate cache and restart

4)open android terminal
first time use Gradle have to change the permission
chmod +x gradlew
./gradlew compileDebugSource –stacktrace -info
then see the error for details

-close Xcode
-go to project folder
-find the xxx.xcodeproj, right click show package

find project.pbxproj and open with txt editor
and search developmentRegions and change it form en to zh-HK

reopen project and you will see Localization section, development language change to HK

Please add this to AndroidManifest.xml:
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
看看androidManifest.xml 
有沒有加入android:exported="true"

<provider
android:name="com.facebook.FacebookContentProvider"
android:exported="true"<=======
android:authorities="com.facebook.app.FacebookContentProvider{APPID}" />

-logcat setting change it to floating mode and disable the floating mode, and double click the logcat bar to resize the logcat, it i will appear again

-if still cannot fix restart android studio and retry

-create project with no activity

-libs copy unity classes file
C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\mono\Release\Classes\classes.jar

-Gradle window =>refresh Gradle project

Create Class MainActivity.class

package hk.connie.testunitypackage;

import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.widget.Toast;

import com.unity3d.player.UnityPlayerActivity;

public class MainActivity extends UnityPlayerActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}

public String ShowDialog(final String _title, final String _content){
runOnUiThread(new Runnable() {
@Override
public void run() {
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
builder.setTitle(_title).setMessage(_content).setPositiveButton("Down", null);
builder.show();
}
});
return "Java return";
}

public void ShowToast(final String mStr2Show){
runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(getApplicationContext(),mStr2Show, Toast.LENGTH_LONG).show();
}
});
}

}

AndroidManifest.xml

<application>
.....
<activity android:name="hk.connie.testunitypackage.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
.....
</application>

build.gradle

Change
apply plugin: ‘com.android.application’
to
apply plugin: ‘com.android.library’

and del
applicationid

Go to Gradle Windows > select the package >tasks > Build > assemble

Then it will generate a aar file to this folder xxx\testUnityPackage\app\build\outputs\aar

Then change the file extension to zip

use winrar to open it and del the classes.jar and change back to aar extension

Then the aar file is ready for unity.
Open a new project in unity
create new button

create new empty game object and add component > new script

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class controller : MonoBehaviour {

    public Button loginBtn;

    // Use this for initialization
	void Start () {
        loginBtn.onClick.AddListener(loginAction);
	}
	
	// Update is called once per frame
	void Update () {
		
	}

    void loginAction()
    {
        Debug.Log("You have clicked the button!");
        using (AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
        {
            using (AndroidJavaObject jo = jc.GetStatic<AndroidJavaObject>("currentActivity"))
            {
                jo.Call("ShowToast", "Unity use Android's AlertDialog");
            }
        }
    }
}

then go to assets windows
create folder Plugins>Android
put the aar file and AndroidManifest.xml to the folder

aar location:
xxx\testUnityPackage\app\build\outputs\aar

AndroidManifest.xml location:
xxx\GIT\testUnityPackage\app\src\main\AndroidManifest.xml

and most important thing is since we have use com.android.support:appcompat-v7 in android studio and we are using gradle method to import the lib, unity will not auto import that library, so we have to copy the v7 lib to the unity, which is location at
C:\Users\xxx\AppData\Local\Android\sdk\extras\android\m2repository\com\android\support\appcompat-v7\xxx.aar

Unity go to build setting=>Android=>PlayerSetting
change the package name, it should be as same as your android studio aar project

aapt.exe dump badging [path-to-apk]

Next Page »

Smiley face

November 2019
S M T W T F S
« Oct    
 12
3456789
10111213141516
17181920212223
24252627282930
晴晴兔的少女回憶 =3=~ All rights reserved.