-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add : log exporter activity ( hidden )
- Loading branch information
1 parent
8eb06e1
commit 83da647
Showing
5 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
> | ||
|
||
<application> | ||
<activity | ||
android:name=".activities.XmbExportLog" | ||
android:exported="true" | ||
android:icon="@drawable/ic_launcher" | ||
android:label="@string/app_name_export_log" | ||
> | ||
<intent-filter> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
<category android:name="android.intent.category.LEANBACK_LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
</manifest> |
37 changes: 37 additions & 0 deletions
37
launcher_app/src/debug/java/id/psw/vshlauncher/activities/XmbExportLog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package id.psw.vshlauncher.activities | ||
|
||
import android.app.Activity | ||
import android.content.Intent | ||
import android.os.Bundle | ||
import id.psw.vshlauncher.Logger | ||
import java.io.File | ||
import java.io.FileOutputStream | ||
import java.text.SimpleDateFormat | ||
import java.util.Locale | ||
import java.util.Calendar | ||
|
||
class XmbExportLog: Activity() { | ||
companion object | ||
{ | ||
const val RQ_PATH_ASKING = 10241 | ||
} | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
startActivityForResult(Logger.createExportIntent(), RQ_PATH_ASKING) | ||
} | ||
|
||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { | ||
if(requestCode == RQ_PATH_ASKING) | ||
{ | ||
if(resultCode == RESULT_OK) | ||
{ | ||
data?.data?.also { | ||
Logger.exportLog(this, it) | ||
} | ||
} | ||
|
||
finish() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> | ||
<string name="app_name_export_log">CXL Export Log</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters