Merge pull request #117 from M4xi1m3/omega-hotfix

[simulator] changed apps id, changed icon, removed telemetry
This commit is contained in:
Quentin
2019-12-30 21:22:50 +01:00
committed by GitHub
13 changed files with 51 additions and 60 deletions

View File

@@ -1,6 +1,5 @@
ion_src += $(addprefix ion/src/simulator/android/src/cpp/, \
images.cpp \
telemetry.cpp \
)
ion_src += $(addprefix ion/src/simulator/shared/, \

View File

@@ -24,7 +24,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.numworks.calculator"
applicationId "io.github.omega.simulator"
minSdkVersion 16
targetSdkVersion 28
def (major, minor, patch) = System.getenv('EPSILON_VERSION').toLowerCase().tokenize('.').collect{it.toInteger()}

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.numworks.calculator"
package="io.github.omega.simulator"
android:installLocation="auto">
<uses-feature android:glEsVersion="0x00020000" />
@@ -18,7 +18,7 @@
android:theme="@style/AppTheme"
android:hardwareAccelerated="true" >
<activity android:name="EpsilonActivity"
<activity android:name="OmegaActivity"
android:label="@string/app_name"
android:alwaysRetainTaskState="true"
android:launchMode="singleInstance"

View File

@@ -7,7 +7,7 @@ SDL_Texture * IonSimulatorLoadImage(SDL_Renderer * renderer, const char * identi
JNIEnv * env = static_cast<JNIEnv *>(SDL_AndroidGetJNIEnv());
jobject activity = static_cast<jobject>(SDL_AndroidGetActivity());
jclass j_class = env->FindClass("com/numworks/calculator/EpsilonActivity");
jclass j_class = env->FindClass("io/github/omega/simulator/OmegaActivity");
jmethodID j_methodId = env->GetMethodID(
j_class,
"retrieveBitmapAsset",

View File

@@ -1,28 +0,0 @@
#include "../../../shared/platform.h"
#include <jni.h>
#include <SDL.h>
void IonSimulatorTelemetryInit() {
JNIEnv * env = static_cast<JNIEnv *>(SDL_AndroidGetJNIEnv());
jobject activity = static_cast<jobject>(SDL_AndroidGetActivity());
jclass j_class = env->FindClass("com/numworks/calculator/EpsilonActivity");
jmethodID j_methodId = env->GetMethodID(j_class,"telemetryInit", "()V");
env->CallVoidMethod(activity, j_methodId);
}
void IonSimulatorTelemetryEvent(const char * eventName) {
JNIEnv * env = static_cast<JNIEnv *>(SDL_AndroidGetJNIEnv());
jobject activity = static_cast<jobject>(SDL_AndroidGetActivity());
jclass j_class = env->FindClass("com/numworks/calculator/EpsilonActivity");
jmethodID j_methodId = env->GetMethodID(j_class,"telemetryEvent", "(Ljava/lang/String;)V");
jstring j_eventName = env->NewStringUTF(eventName);
env->CallVoidMethod(activity, j_methodId, j_eventName);
}
void IonSimulatorTelemetryDeinit() {
}

View File

@@ -1,4 +1,4 @@
package com.numworks.calculator;
package io.github.omega.simulator;
import java.util.Locale;
@@ -14,10 +14,7 @@ import com.google.android.gms.analytics.HitBuilders;
import org.libsdl.app.SDLActivity;
public class EpsilonActivity extends SDLActivity {
private static GoogleAnalytics sAnalytics;
private static Tracker sTracker;
public class OmegaActivity extends SDLActivity {
protected String[] getLibraries() {
return new String[] {
"epsilon"
@@ -42,14 +39,4 @@ public class EpsilonActivity extends SDLActivity {
}
return bitmap;
}
public void telemetryInit() {
sAnalytics = GoogleAnalytics.getInstance(this);
sTracker = sAnalytics.newTracker("UA-93775823-3");
}
public void telemetryEvent(String eventName) {
sTracker.setScreenName(eventName);
sTracker.send(new HitBuilders.ScreenViewBuilder().build());
}
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="yellow">#FFB734</color>
<color name="yellow">#C03535</color>
<color name="lightGray">#F7F7F7</color>
</resources>

View File

@@ -1,3 +1,36 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
<path d="M744.7 189c-27.1 0-49.2 20.1-49.2 44.8v431.8l-369.8-457c-9.9-12.2-25.9-19.6-42.7-19.6-29.2 0-53 21.5-53 47.9v553.3c0 24.7 22.1 44.8 49.3 44.8 27.1 0 49.2-20.1 49.2-44.8V358.6l369.9 458.2c9.2 11.4 24 18.2 39.7 18.2h6.7c27.1 0 49.2-20.1 49.2-44.8V233.8c0-24.7-22.1-44.8-49.3-44.8z" fill="#fff" stroke="none" />
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 1024 1024"
version="1.1"
id="svg4">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#000000"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
id="namedview6"
showgrid="false"/>
<path
d="M 786.42601,739.31189 H 662.42149 v -27.04386 c 36.3552,-22.06089 67.35755,-51.89166 90.72406,-87.52113 C 783.0817,579.10128 798.9071,526.1403 798.9071,471.5909 798.9071,315.76998 670.20061,189 512,189 353.79939,189 225.09533,315.76998 225.09533,471.59329 c 0,54.5494 15.82541,107.50799 45.76398,153.156 23.36652,35.62947 54.37129,65.45785 90.72406,87.51874 v 27.04386 H 237.57399 C 210.74657,739.31189 189,760.73167 189,787.15594 189,813.58022 210.74657,835 237.57399,835 h 172.58337 c 26.8274,0 48.57398,-21.41978 48.57398,-47.84406 V 683.87498 c 0,-18.49651 -10.82228,-35.33284 -27.79403,-43.24385 C 364.90826,609.84826 322.2433,543.49812 322.2433,471.59329 c 0,-103.05849 85.12348,-186.9052 189.7567,-186.9052 104.63322,0 189.75913,83.84671 189.75913,186.9052 0,71.90244 -42.66496,138.25497 -108.69401,169.03784 -16.96932,7.9134 -27.79161,24.74973 -27.79161,43.24385 V 787.15594 C 565.27351,813.58022 587.02009,835 613.8475,835 H 786.42601 C 813.25343,835 835,813.58022 835,787.15594 c 0,-26.42427 -21.74657,-47.84405 -48.57399,-47.84405 z"
id="path2-3"
style="fill:#ffffff;stroke-width:2.41038179" />
</svg>

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>Epsilon</string>
<key>CFBundleIdentifier</key>
<string>com.numworks.calculator</string>
<string>io.github.omega.simulator</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>

View File

@@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string>app.icns</string>
<key>CFBundleIdentifier</key>
<string>com.numworks.calculator</string>
<string>io.github.omega.simulator</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>

View File

@@ -198,7 +198,7 @@ Event getPlatformEvent() {
return eventFromSDLTextInputEvent(event.text);
}
if (event.type == SDL_APP_WILLENTERFOREGROUND) {
IonSimulatorTelemetryEvent("Calculator");
// IonSimulatorTelemetryEvent("Calculator");
return None;
}
}

View File

@@ -56,12 +56,12 @@ int main(int argc, char * argv[]) {
arguments.push_back(language);
}
IonSimulatorTelemetryInit();
// IonSimulatorTelemetryInit();
Ion::Simulator::Main::init();
IonSimulatorTelemetryEvent("Calculator");
// IonSimulatorTelemetryEvent("Calculator");
ion_main(arguments.size(), &arguments[0]);
Ion::Simulator::Main::quit();
IonSimulatorTelemetryDeinit();
// IonSimulatorTelemetryDeinit();
return 0;
}

View File

@@ -13,9 +13,9 @@ extern "C" {
SDL_Texture * IonSimulatorLoadImage(SDL_Renderer * renderer, const char * identifier);
char * IonSimulatorGetLanguageCode();
void IonSimulatorTelemetryInit();
void IonSimulatorTelemetryEvent(const char * eventName);
void IonSimulatorTelemetryDeinit();
// void IonSimulatorTelemetryInit();
// void IonSimulatorTelemetryEvent(const char * eventName);
// void IonSimulatorTelemetryDeinit();
void IonSimulatorKeyboardKeyDown(int keyNumber);
void IonSimulatorKeyboardKeyUp(int keyNumber);