Calculator Overlay

This commit is contained in:
Sergey Solovyev 2012-11-21 12:31:53 +04:00
parent 75b60e7390
commit 85feb7cfef
4 changed files with 30 additions and 4 deletions

View File

@ -53,6 +53,17 @@
<!-- OVERLAY CONFIG -->
<activity android:launchMode="singleInstance"
android:label="@string/c_app_name_on_screen"
android:name=".CalculatorOnScreenStartActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<service android:name=".overlay.CalculatorOverlayService">
<intent-filter>
<action android:name="org.solovyev.calculator.widget.EDITOR_STATE_CHANGED"/>

View File

@ -8,6 +8,7 @@
<resources>
<string name="c_app_name">Calculator++</string>
<string name="c_app_name_on_screen">Calculator++ (On Screen)</string>
<string name="c_app_name_free">Calculator++ Free</string>
<string name="c_app_icon_name">Calc++</string>
<string name="c_app_settings">Settings</string>

View File

@ -1,6 +1,5 @@
package org.solovyev.android.calculator;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import net.robotmedia.billing.BillingController;
@ -14,7 +13,6 @@ import org.solovyev.android.ads.AdsController;
import org.solovyev.android.calculator.external.AndroidExternalListenersContainer;
import org.solovyev.android.calculator.history.AndroidCalculatorHistory;
import org.solovyev.android.calculator.model.AndroidCalculatorEngine;
import org.solovyev.android.calculator.overlay.CalculatorOverlayService;
/**
* User: serso
@ -117,8 +115,6 @@ public class CalculatorApplication extends android.app.Application {
public void run() {
BillingController.checkBillingSupported(CalculatorApplication.this);
AdsController.getInstance().isAdFree(CalculatorApplication.this);
startService(new Intent(getApplicationContext(), CalculatorOverlayService.class));
}
}).start();

View File

@ -0,0 +1,18 @@
package org.solovyev.android.calculator;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import org.solovyev.android.calculator.overlay.CalculatorOverlayService;
public class CalculatorOnScreenStartActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
startService(new Intent(this, CalculatorOverlayService.class));
this.finish();
}
}