remove ads, bump version

This commit is contained in:
Andrew Dolgov 2012-01-25 09:33:04 +03:00
parent 2de7fae820
commit 0f3fc36c93
7 changed files with 16 additions and 96 deletions

View File

@ -6,6 +6,5 @@
<classpathentry kind="lib" path="C:/Users/fox/workspace/org.fox.ttrss/libs/gson-1.7.1.jar"/> <classpathentry kind="lib" path="C:/Users/fox/workspace/org.fox.ttrss/libs/gson-1.7.1.jar"/>
<classpathentry kind="lib" path="C:/Users/fox/workspace/org.fox.ttrss/libs/jsoup-1.6.1.jar"/> <classpathentry kind="lib" path="C:/Users/fox/workspace/org.fox.ttrss/libs/jsoup-1.6.1.jar"/>
<classpathentry kind="lib" path="libs/android-support-v4.jar"/> <classpathentry kind="lib" path="libs/android-support-v4.jar"/>
<classpathentry kind="lib" path="C:/Users/fox/android-sdk-windows/extras/google/admob_ads_sdk/GoogleAdMobAdsSdk-4.3.1.jar"/>
<classpathentry kind="output" path="bin/classes"/> <classpathentry kind="output" path="bin/classes"/>
</classpath> </classpath>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss" package="org.fox.ttrss"
android:versionCode="52" android:versionCode="53"
android:versionName="0.4.4" > android:versionName="0.4.5" >
<uses-sdk android:minSdkVersion="7" /> <uses-sdk android:minSdkVersion="7" />
@ -38,17 +38,19 @@
android:name=".PreferencesActivity" > android:name=".PreferencesActivity" >
</activity> </activity>
<service android:enabled="true" android:name=".OfflineDownloadService" /> <service
<service android:enabled="true" android:name=".OfflineUploadService" /> android:enabled="true"
<service android:enabled="true" android:name=".ImageCacheService" /> android:name=".OfflineDownloadService" />
<service
android:enabled="true"
android:name=".OfflineUploadService" />
<service
android:enabled="true"
android:name=".ImageCacheService" />
<activity <meta-data
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:name="com.google.android.backup.api_key"
android:name="com.google.ads.AdActivity" />
<meta-data android:name="com.google.android.backup.api_key"
android:value="AEdPqrEAAAAIwG6zsGB4qo6ZhjfwIJpm9WI7AqmWaoRXm6ZJnA" /> android:value="AEdPqrEAAAAIwG6zsGB4qo6ZhjfwIJpm9WI7AqmWaoRXm6ZJnA" />
</application> </application>
</manifest> </manifest>

View File

@ -106,19 +106,6 @@
android:layout_weight="1" android:layout_weight="1"
android:padding="3dip" > android:padding="3dip" >
</WebView> </WebView>
<!-- Ad Placeholder -->
<com.google.ads.AdView
android:id="@+id/ad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
ads:adSize="BANNER"
ads:adUnitId="a14ed24fe8c671c"
android:background="@android:color/transparent"
android:gravity="center"
ads:loadAdOnCreate="false" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@ -3,7 +3,6 @@ package org.fox.ttrss;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import org.fox.ttrss.OnlineServices.RelativeArticle;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element; import org.jsoup.nodes.Element;
@ -16,22 +15,13 @@ import android.preference.PreferenceManager;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.text.Html; import android.text.Html;
import android.text.method.LinkMovementMethod; import android.text.method.LinkMovementMethod;
import android.util.Log;
import android.view.GestureDetector;
import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.webkit.WebSettings; import android.webkit.WebSettings;
import android.webkit.WebView; import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import com.google.ads.AdRequest;
import com.google.ads.AdView;
public class ArticleFragment extends Fragment { public class ArticleFragment extends Fragment {
@SuppressWarnings("unused") @SuppressWarnings("unused")
private final String TAG = this.getClass().getSimpleName(); private final String TAG = this.getClass().getSimpleName();
@ -179,19 +169,6 @@ public class ArticleFragment extends Fragment {
tagv.setVisibility(View.GONE); tagv.setVisibility(View.GONE);
} }
} }
AdView av = (AdView)view.findViewById(R.id.ad);
if (av != null) {
if (!m_onlineServices.getLicensed()) {
AdRequest request = new AdRequest();
request.addTestDevice(AdRequest.TEST_EMULATOR);
av.loadAd(request);
} else {
av.setVisibility(View.GONE);
}
}
} }
return view; return view;

View File

@ -1,15 +1,11 @@
package org.fox.ttrss; package org.fox.ttrss;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Timer; import java.util.Timer;
import java.util.TimerTask; import java.util.TimerTask;
import javax.crypto.spec.DESedeKeySpec;
import android.app.ActionBar;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.Dialog; import android.app.Dialog;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
@ -20,7 +16,6 @@ import android.content.DialogInterface.OnMultiChoiceClickListener;
import android.content.Intent; import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.database.Cursor; import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase;
@ -31,10 +26,8 @@ import android.preference.PreferenceManager;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTransaction; import android.support.v4.app.FragmentTransaction;
import android.support.v4.widget.SearchViewCompat;
import android.util.Log; import android.util.Log;
import android.view.ActionMode; import android.view.ActionMode;
import android.view.Display;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.Menu; import android.view.Menu;
import android.view.MenuInflater; import android.view.MenuInflater;
@ -44,7 +37,6 @@ import android.view.ViewGroup;
import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils;
import android.widget.AdapterView.AdapterContextMenuInfo; import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.EditText; import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.SearchView; import android.widget.SearchView;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
@ -71,7 +63,6 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
private boolean m_unreadArticlesOnly = true; private boolean m_unreadArticlesOnly = true;
private boolean m_compatMode = false; private boolean m_compatMode = false;
private boolean m_enableCats = false; private boolean m_enableCats = false;
private int m_isLicensed = -1;
private int m_apiLevel = 0; private int m_apiLevel = 0;
private boolean m_isOffline = false; private boolean m_isOffline = false;
private boolean m_offlineModeReady = false; private boolean m_offlineModeReady = false;
@ -145,11 +136,6 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
} }
} }
@Override
public boolean getLicensed() {
return m_isLicensed == 1;
}
@Override @Override
public int getApiLevel() { public int getApiLevel() {
return m_apiLevel; return m_apiLevel;
@ -468,7 +454,6 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
m_activeCategory = savedInstanceState m_activeCategory = savedInstanceState
.getParcelable("activeCategory"); .getParcelable("activeCategory");
m_apiLevel = savedInstanceState.getInt("apiLevel"); m_apiLevel = savedInstanceState.getInt("apiLevel");
m_isLicensed = savedInstanceState.getInt("isLicensed");
m_offlineModeReady = savedInstanceState.getBoolean("offlineModeReady"); m_offlineModeReady = savedInstanceState.getBoolean("offlineModeReady");
} }
@ -506,17 +491,6 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
startActivity(offline); startActivity(offline);
finish(); finish();
} else { } else {
List<PackageInfo> pkgs = getPackageManager()
.getInstalledPackages(0);
for (PackageInfo p : pkgs) {
if ("org.fox.ttrss.key".equals(p.packageName)) {
m_isLicensed = 1;
Log.d(TAG, "license apk found");
break;
}
}
if (m_smallScreenMode) { if (m_smallScreenMode) {
if (m_selectedArticle != null) { if (m_selectedArticle != null) {
findViewById(R.id.feeds_fragment).setVisibility(View.GONE); findViewById(R.id.feeds_fragment).setVisibility(View.GONE);
@ -693,7 +667,6 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
out.putBoolean("unreadArticlesOnly", m_unreadArticlesOnly); out.putBoolean("unreadArticlesOnly", m_unreadArticlesOnly);
out.putParcelable("activeCategory", m_activeCategory); out.putParcelable("activeCategory", m_activeCategory);
out.putInt("apiLevel", m_apiLevel); out.putInt("apiLevel", m_apiLevel);
out.putInt("isLicensed", m_isLicensed);
out.putBoolean("offlineModeReady", m_offlineModeReady); out.putBoolean("offlineModeReady", m_offlineModeReady);
} }

View File

@ -3,14 +3,12 @@ package org.fox.ttrss;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import org.fox.ttrss.OnlineServices.RelativeArticle;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element; import org.jsoup.nodes.Element;
import org.jsoup.select.Elements; import org.jsoup.select.Elements;
import android.app.Activity; import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.database.Cursor; import android.database.Cursor;
import android.os.Bundle; import android.os.Bundle;
@ -19,21 +17,13 @@ import android.provider.BaseColumns;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.text.Html; import android.text.Html;
import android.text.method.LinkMovementMethod; import android.text.method.LinkMovementMethod;
import android.util.Log;
import android.view.GestureDetector;
import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.webkit.WebSettings; import android.webkit.WebSettings;
import android.webkit.WebView; import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import com.google.ads.AdView;
public class OfflineArticleFragment extends Fragment { public class OfflineArticleFragment extends Fragment {
@SuppressWarnings("unused") @SuppressWarnings("unused")
private final String TAG = this.getClass().getSimpleName(); private final String TAG = this.getClass().getSimpleName();
@ -185,13 +175,6 @@ public class OfflineArticleFragment extends Fragment {
String tagsStr = m_cursor.getString(m_cursor.getColumnIndex("tags")); String tagsStr = m_cursor.getString(m_cursor.getColumnIndex("tags"));
tagv.setText(tagsStr); tagv.setText(tagsStr);
} }
AdView av = (AdView)view.findViewById(R.id.ad);
if (av != null) {
av.setVisibility(View.GONE);
}
} }
return view; return view;

View File

@ -22,7 +22,6 @@ public interface OnlineServices {
public boolean getUnreadArticlesOnly(); public boolean getUnreadArticlesOnly();
public boolean isSmallScreen(); public boolean isSmallScreen();
public boolean getUnreadOnly(); public boolean getUnreadOnly();
public boolean getLicensed();
public int getApiLevel(); public int getApiLevel();
public void setSelectedArticle(Article article); public void setSelectedArticle(Article article);
} }