-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Todor Balabanov
committed
Jun 27, 2016
1 parent
07c5e09
commit 37607c7
Showing
10 changed files
with
235 additions
and
16 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 |
---|---|---|
@@ -1,19 +1,49 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="eu.veldsoft.kechi" android:versionCode="1" | ||
android:versionName="1.0"> | ||
package="eu.veldsoft.kechi" | ||
android:versionCode="2" | ||
android:versionName="1.1" > | ||
|
||
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="19" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
|
||
<application android:allowBackup="true" android:icon="@drawable/ic_launcher" | ||
android:label="@string/app_name" android:theme="@style/AppTheme"> | ||
<activity android:name=".GameActivity" android:label="@string/title_activity_main"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<uses-sdk | ||
android:minSdkVersion="15" | ||
android:targetSdkVersion="19" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
<application | ||
android:allowBackup="true" | ||
android:icon="@drawable/ic_launcher" | ||
android:label="@string/app_name" | ||
android:theme="@style/AppTheme" > | ||
<activity | ||
android:name=".GameActivity" | ||
android:label="@string/title_activity_main" > | ||
</activity> | ||
<activity | ||
android:name=".SplashActivity" | ||
android:label="@string/title_activity_splash" | ||
android:noHistory="true" > | ||
<meta-data | ||
android:name="timeout" | ||
android:value="5000" /> | ||
<meta-data | ||
android:name="redirect" | ||
android:value="eu.veldsoft.kechi.GameActivity" /> | ||
|
||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name=".HelpActivity" | ||
android:label="@string/title_activity_help" > | ||
</activity> | ||
<activity | ||
android:name=".AboutActivity" | ||
android:label="@string/title_activity_about" > | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
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,23 @@ | ||
<html> | ||
<body bgcolor="black"> | ||
<div style="text-align:center"> | ||
|
||
<script type='text/javascript'><!--//<![CDATA[ | ||
var m3_u = (location.protocol=='https:'?'https://adserver.veldsoft.eu/www/delivery/ajs.php':'http://adserver.veldsoft.eu/www/delivery/ajs.php'); | ||
var m3_r = Math.floor(Math.random()*99999999999); | ||
if (!document.MAX_used) document.MAX_used = ','; | ||
document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u); | ||
document.write ("?zoneid=21&target=_blank"); | ||
document.write ('&cb=' + m3_r); | ||
if (document.MAX_used != ',') document.write ("&exclude=" + document.MAX_used); | ||
document.write (document.charset ? '&charset='+document.charset : (document.characterSet ? '&charset='+document.characterSet : '')); | ||
document.write ("&loc=" + escape(window.location)); | ||
if (document.referrer) document.write ("&referer=" + escape(document.referrer)); | ||
if (document.context) document.write ("&context=" + escape(document.context)); | ||
if (document.mmm_fo) document.write ("&mmm_fo=1"); | ||
document.write ("'><\/scr"+"ipt>"); | ||
//]]>--></script><noscript><a href='http://adserver.veldsoft.eu/www/delivery/ck.php?n=ad4e0c5a&cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://adserver.veldsoft.eu/www/delivery/avw.php?zoneid=21&cb=INSERT_RANDOM_NUMBER_HERE&n=ad4e0c5a' border='0' alt='' /></a></noscript> | ||
|
||
</div> | ||
</body> | ||
</html> |
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,18 @@ | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context="${relativePackage}.${activityClass}" > | ||
|
||
<EditText | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:clickable="false" | ||
android:focusable="false" | ||
android:focusableInTouchMode="false" | ||
android:freezesText="true" | ||
android:inputType="textMultiLine" | ||
android:longClickable="false" | ||
android:text="@string/about_text" /> | ||
|
||
</RelativeLayout> |
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,18 @@ | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context="${relativePackage}.${activityClass}" > | ||
|
||
<EditText | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:clickable="false" | ||
android:focusable="false" | ||
android:focusableInTouchMode="false" | ||
android:freezesText="true" | ||
android:inputType="textMultiLine" | ||
android:longClickable="false" | ||
android:text="@string/help_text" /> | ||
|
||
</RelativeLayout> |
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,12 @@ | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context="${relativePackage}.${activityClass}" > | ||
|
||
<WebView | ||
android:id="@+id/ads" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" /> | ||
|
||
</RelativeLayout> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package eu.veldsoft.kechi; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.view.Menu; | ||
import android.view.MenuItem; | ||
|
||
public class AboutActivity extends Activity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_about); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package eu.veldsoft.kechi; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.view.Menu; | ||
import android.view.MenuItem; | ||
|
||
public class HelpActivity extends Activity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_help); | ||
} | ||
} |
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,70 @@ | ||
package eu.veldsoft.kechi; | ||
|
||
import java.util.Timer; | ||
import java.util.TimerTask; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.content.pm.PackageManager; | ||
import android.os.Bundle; | ||
import android.webkit.WebView; | ||
import android.widget.Toast; | ||
|
||
public class SplashActivity extends Activity { | ||
|
||
private long timeout = 0L; | ||
|
||
private String redirect = ""; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_splash); | ||
|
||
/* | ||
* Activate JavaScript. | ||
*/ | ||
((WebView) findViewById(R.id.ads)).getSettings().setJavaScriptEnabled(true); | ||
|
||
/* | ||
* Load local web page as banner holder. | ||
*/ | ||
((WebView) findViewById(R.id.ads)).loadUrl("file:///android_asset/banner.html"); | ||
|
||
/* | ||
* Get splash screen timeout. | ||
*/ | ||
try { | ||
timeout = getPackageManager().getActivityInfo(this.getComponentName(), | ||
PackageManager.GET_ACTIVITIES | PackageManager.GET_META_DATA).metaData.getInt("timeout", 0); | ||
} catch (Exception e) { | ||
timeout = 0; | ||
} | ||
|
||
/* | ||
* Get redirect activity class name. | ||
*/ | ||
try { | ||
redirect = getPackageManager().getActivityInfo(this.getComponentName(), | ||
PackageManager.GET_ACTIVITIES | PackageManager.GET_META_DATA).metaData.getString("redirect"); | ||
} catch (Exception e) { | ||
redirect = this.getClass().toString(); | ||
Toast.makeText(this, getResources().getString(R.string.redirect_activity_is_missing_message), | ||
Toast.LENGTH_LONG).show(); | ||
} | ||
} | ||
|
||
@Override | ||
protected void onResume() { | ||
super.onResume(); | ||
|
||
new Timer().schedule(new TimerTask() { | ||
public void run() { | ||
try { | ||
startActivity(new Intent(SplashActivity.this, Class.forName(redirect))); | ||
} catch (Exception e) { | ||
} | ||
} | ||
}, timeout); | ||
} | ||
} |