Skip to content
Open

Dev #14

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions UC_COVID_19_GREEN/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions UC_COVID_19_GREEN/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion UC_COVID_19_GREEN/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
defaultConfig {
applicationId "com.example.uc_covid_19_green"
minSdk 21
targetSdk 31
targetSdk 27
versionCode 1
versionName "1.0"

Expand All @@ -33,10 +33,20 @@ android {

dependencies {

//Kakao map API
implementation files('libs/libDaumMapAndroid.jar')
implementation fileTree(include: ['*.jar'], dir: 'libs')

//QR Code Scan
implementation 'com.journeyapps:zxing-android-embedded:3.6.0'



implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation 'com.google.android.gms:play-services-maps:17.0.1'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
Expand Down
Binary file added UC_COVID_19_GREEN/app/libs/libDaumMapAndroid.jar
Binary file not shown.
27 changes: 24 additions & 3 deletions UC_COVID_19_GREEN/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,44 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.uc_covid_19_green">

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.UC_COVID_19_GREEN">
<activity
android:name=".NationwideActivity"
android:exported="true" />
<activity
android:name=".SocialDistanceActivity"
android:exported="true" />
<activity
android:name=".QRScanActivity"
android:exported="true" />
<activity
android:name=".MainActivity"
android:exported="true" />
<activity android:name=".InitailActivity"
<activity
android:name=".InitailActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<meta-data
android:name="com.kakao.sdk.AppKey"
android:value="2a90c13744036b6519c5eb4ced80b60b" />
</application>

</manifest>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@
import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
import android.os.Bundle;
import android.util.Base64;
import android.util.Log;
import android.view.View;
import android.widget.Button;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class InitailActivity extends AppCompatActivity {
Button btn_start;

Expand All @@ -26,5 +34,29 @@ public void onClick(View view) {
}
});

getHashKey();

}
}

private void getHashKey(){
PackageInfo packageInfo = null;
try {
packageInfo = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_SIGNATURES);
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
if (packageInfo == null)
Log.e("KeyHash", "KeyHash:null");

for (Signature signature : packageInfo.signatures) {
try {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
Log.d("KeyHash", Base64.encodeToString(md.digest(), Base64.DEFAULT));
} catch (NoSuchAlgorithmException e) {
Log.e("KeyHash", "Unable to get MessageDigest. signature=" + signature, e);
}
}
}

}
Loading