Android Coinpot Faucet Rotator (Source & APK)
@bitlander00 did a great write up about using coinpot faucets to increase your steempower. A while back I wrote a simple app for coinpot and the Moon based faucets. They are the most stable and nicely formatted for mobile, in my opinion. He expressed some interest in trying it out and I figured others might also. I lost the original code but it is simple enough I rebuilt it. Here is a link to the apk. https://www.dropbox.com/s/xgk7i6fd5y2n5b5/cprotator.apk?dl=0
And here is the simple code if you'd like to build/improve it yourself.
All the app does is create a webview tp display the page, a spinner to select which page, and the shouldOverrideLoading method to keep ads from redirecting away from the faucet page. Feel free to ask for info, explanation, or assistance. Do with it what you will and steem on friends!
MainActivity.java
package com.crypto570.cprotator;
import android.app.*;
import android.os.*;
import android.view.*;
import android.webkit.*;
import android.widget.*;
public class MainActivity extends Activity
{
WebView wv;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
wv = (WebView)findViewById(R.id.webview);
wv.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
boolean blockLoading = false;
if (url.contains("coinpot.co") ||
url.contains("moonbit.co.in") ||
url.contains("moonliteco.in") ||
url.contains("moondoge.co.in") ||
url.contains("moondash.co.in") ||
url.contains("moonb.ch"))
{
blockLoading = false;
}
else
{
blockLoading = true;
}
return blockLoading;
}
});
wv.getSettings().setJavaScriptEnabled(true);
wv.getSettings().setDomStorageEnabled(true);
wv.loadUrl("http://coinpot.co");
Spinner spnr = (Spinner) findViewById(R.id.spinner1);
spnr.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onNothingSelected(AdapterView<?> p1)
{
// TODO: Implement this method
}
public void onItemSelected(AdapterView<?> parent, View view, int position, long id)
{
switch (position)
{
case 0: wv.loadUrl("https://coinpot.co/dashboard"); break;
case 1: wv.loadUrl("http://moonbit.co.in"); break;
case 2: wv.loadUrl("http://moonliteco.in"); break;
case 3: wv.loadUrl("http://moondoge.co.in"); break;
case 4: wv.loadUrl("http://moondash.co.in"); break;
case 5: wv.loadUrl("http://moonb.ch"); break;
}
}
});
}
}
main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="top|center"
android:orientation="vertical">
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="horizontal"
android:gravity="center">
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="100dp"
android:orientation="vertical"
android:layout_weight="1.0">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="CoinpotRotator"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="by crypto570"
android:gravity="right"/>
</LinearLayout>
<Spinner
android:layout_height="wrap_content"
android:layout_width="100dp"
android:entries="@array/faucets"
android:layout_weight="1.0"
android:id="@+id/spinner1"/>
</LinearLayout>
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/webview"/>
</LinearLayout>
Androidmanifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.crypto570.cprotator" >
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar"
android:resizeableActivity = "true">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="orientation"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Styles.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="@android:style/Theme.NoTitleBar">
</style>
</resources>
Strings.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">CoinpotRotator</string>
<string-array name="faucets">
<item>coinpot</item>
<item>moonBTC</item>
<item>moonLTC</item>
<item>moonDOGE</item>
<item>moonDASH</item>
<item>moonCASH</item>
</string-array>
</resources>
The host seems to not like disallowing ad diverts.. who'da thunk it? The the "shouldOverrideLoading" method should be removed or it may not function for you. There seems to be no interest, but if any sparks let me know and i can rebuild the apk for you.