summaryrefslogtreecommitdiff
path: root/src/de
diff options
context:
space:
mode:
Diffstat (limited to 'src/de')
-rw-r--r--src/de/podfetcher/activity/FlattrAuthActivity.java67
-rw-r--r--src/de/podfetcher/util/FlattrUtil.java11
2 files changed, 78 insertions, 0 deletions
diff --git a/src/de/podfetcher/activity/FlattrAuthActivity.java b/src/de/podfetcher/activity/FlattrAuthActivity.java
new file mode 100644
index 000000000..a2fb57b7f
--- /dev/null
+++ b/src/de/podfetcher/activity/FlattrAuthActivity.java
@@ -0,0 +1,67 @@
+package de.podfetcher.activity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.actionbarsherlock.app.SherlockActivity;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuItem;
+
+import de.podfetcher.R;
+
+/** Guides the user through the authentication process */
+public class FlattrAuthActivity extends SherlockActivity {
+ private static final String TAG = "FlattrAuthActivity";
+
+ private TextView txtvExplanation;
+ private Button butAuthenticate;
+ private Button butReturn;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ Log.d(TAG, "Activity created");
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+ setContentView(R.layout.flattr_auth);
+ txtvExplanation = (TextView) findViewById(R.id.txtvExplanation);
+ butAuthenticate = (Button) findViewById(R.id.but_authenticate);
+ butReturn = (Button) findViewById(R.id.but_return_home);
+
+ butReturn.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(new Intent(FlattrAuthActivity.this,
+ PodfetcherActivity.class));
+ }
+ });
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+ Log.d(TAG, "Activity resumed");
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ return true;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case android.R.id.home:
+ finish();
+ break;
+ default:
+ return false;
+ }
+ return true;
+ }
+
+}
diff --git a/src/de/podfetcher/util/FlattrUtil.java b/src/de/podfetcher/util/FlattrUtil.java
new file mode 100644
index 000000000..bd94cec9a
--- /dev/null
+++ b/src/de/podfetcher/util/FlattrUtil.java
@@ -0,0 +1,11 @@
+package de.podfetcher.util;
+
+/** Utility methods for doing something with flattr. */
+public class FlattrUtil {
+
+ private static final String HOST_NAME = "";
+ private static final String APP_KEY = "";
+ private static final String APP_SECRET = "";
+
+ private static final String PREF_ACCESS_TOKEN = "de.danoeh.antennapod.preference.flattrAccessToken";
+}