Genesis Android App Repository Initialization

master
msmannan00 2019-03-05 11:33:58 +05:00
parent a05d4499a9
commit 49e59d28df
67 changed files with 2451 additions and 0 deletions

13
.gitignore vendored Normal file
View File

@ -0,0 +1,13 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild

View File

@ -0,0 +1,35 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<Objective-C-extensions>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="h" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings>
</code_scheme>
</component>

View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

18
.idea/gradle.xml Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>

9
.idea/misc.xml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>

1
app/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

44
app/build.gradle Normal file
View File

@ -0,0 +1,44 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'maven'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.myapplication"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.android.gms:play-services-ads:17.1.1'
implementation "cz.msebera.android:httpclient:4.4.1.2"
compile 'info.guardianproject.netcipher:netcipher:2.0.0-alpha1'
compile 'info.guardianproject.netcipher:netcipher-okhttp3:2.0.0-alpha1'
compile 'com.squareup.okhttp3:okhttp:3.4.2'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

21
app/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

BIN
app/release/app-release.apk Normal file

Binary file not shown.

1
app/release/output.json Normal file
View File

@ -0,0 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

View File

@ -0,0 +1,24 @@
package com.example.myapplication
import android.support.test.InstrumentationRegistry
import android.support.test.runner.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getTargetContext()
assertEquals("com.example.myapplication", appContext.packageName)
}
}

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapplication">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher_v1"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round_v1"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
<activity android:name=".applicationController"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-5074525529134731~2926711128"/>
</application>
</manifest>

View File

@ -0,0 +1,490 @@
package com.example.myapplication;
import android.os.Build;
import android.util.Log;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Method;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.List;
import javax.net.SocketFactory;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLHandshakeException;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
import javax.security.auth.x500.X500Principal;
import cz.msebera.android.httpclient.HttpHost;
import cz.msebera.android.httpclient.conn.socket.LayeredConnectionSocketFactory;
import cz.msebera.android.httpclient.conn.ssl.DefaultHostnameVerifier;
import cz.msebera.android.httpclient.conn.ssl.SSLContexts;
import cz.msebera.android.httpclient.conn.ssl.SSLInitializationException;
import cz.msebera.android.httpclient.conn.ssl.X509HostnameVerifier;
import cz.msebera.android.httpclient.conn.util.PublicSuffixMatcherLoader;
import cz.msebera.android.httpclient.protocol.HttpContext;
import cz.msebera.android.httpclient.util.Args;
import cz.msebera.android.httpclient.util.TextUtils;
/*
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.HttpHost;
import org.apache.http.annotation.ThreadSafe;
import org.apache.http.conn.socket.LayeredConnectionSocketFactory;
import org.apache.http.conn.util.PublicSuffixMatcherLoader;
import org.apache.http.protocol.HttpContext;
import org.apache.http.ssl.SSLContexts;
import org.apache.http.util.Args;
import org.apache.http.util.TextUtils;
*/
/**
* Layered socket factory for TLS/SSL connections.
* <p>
* SSLSocketFactory can be used to validate the identity of the HTTPS server against a list of
* trusted certificates and to authenticate to the HTTPS server using a private key.
* <p>
* SSLSocketFactory will enable server authentication when supplied with
* a {@link java.security.KeyStore trust-store} file containing one or several trusted certificates. The client
* secure socket will reject the connection during the SSL session handshake if the target HTTPS
* server attempts to authenticate itself with a non-trusted certificate.
* <p>
* Use JDK keytool utility to import a trusted certificate and generate a trust-store file:
* <pre>
* keytool -import -alias "my server cert" -file server.crt -keystore my.truststore
* </pre>
* <p>
* In special cases the standard trust verification process can be bypassed by using a custom
* {@link org.apache.http.conn.ssl.TrustStrategy}. This interface is primarily intended for allowing self-signed
* certificates to be accepted as trusted without having to add them to the trust-store file.
* <p>
* SSLSocketFactory will enable client authentication when supplied with
* a {@link java.security.KeyStore key-store} file containing a private key/public certificate
* pair. The client secure socket will use the private key to authenticate
* itself to the target HTTPS server during the SSL session handshake if
* requested to do so by the server.
* The target HTTPS server will in its turn verify the certificate presented
* by the client in order to establish client's authenticity.
* <p>
* Use the following sequence of actions to generate a key-store file
* </p>
* <ul>
* <li>
* <p>
* Use JDK keytool utility to generate a new key
* </p>
* <pre>keytool -genkey -v -alias "my client key" -validity 365 -keystore my.keystore</pre>
* <p>
* For simplicity use the same password for the key as that of the key-store
* </p>
* </li>
* <li>
* <p>
* Issue a certificate signing request (CSR)
* </p>
* <pre>keytool -certreq -alias "my client key" -file mycertreq.csr -keystore my.keystore</pre>
* </li>
* <li>
* <p>
* Send the certificate request to the trusted Certificate Authority for signature.
* One may choose to act as her own CA and sign the certificate request using a PKI
* tool, such as OpenSSL.
* </p>
* </li>
* <li>
* <p>
* Import the trusted CA root certificate
* </p>
* <pre>keytool -import -alias "my trusted ca" -file caroot.crt -keystore my.keystore</pre>
* </li>
* <li>
* <p>
* Import the PKCS#7 file containing the complete certificate chain
* </p>
* <pre>keytool -import -alias "my client key" -file mycert.p7 -keystore my.keystore</pre>
* </li>
* <li>
* <p>
* Verify the content of the resultant keystore file
* </p>
* <pre>keytool -list -v -keystore my.keystore</pre>
* </li>
* </ul>
*
* @since 4.3
*/
// @ThreadSafe @SuppressWarnings("deprecation")
public class SSLConnectionSocketFactory implements
LayeredConnectionSocketFactory {
private final static String TAG = "HttpClient";
public static final String TLS = "TLS";
public static final String SSL = "SSL";
public static final String SSLV2 = "SSLv2";
/*
@Deprecated
public static final X509HostnameVerifier ALLOW_ALL_HOSTNAME_VERIFIER
= AllowAllHostnameVerifier.INSTANCE;
@Deprecated
public static final X509HostnameVerifier BROWSER_COMPATIBLE_HOSTNAME_VERIFIER
= BrowserCompatHostnameVerifier.INSTANCE;
@Deprecated
public static final X509HostnameVerifier STRICT_HOSTNAME_VERIFIER
= StrictHostnameVerifier.INSTANCE;
*/
// private final Log log = LogFactory.getLog(getClass());
/**
* @since 4.4
*/
public static HostnameVerifier getDefaultHostnameVerifier() {
return new DefaultHostnameVerifier(
PublicSuffixMatcherLoader.getDefault());
}
/**
* Obtains default SSL socket factory with an SSL context based on the standard JSSE
* trust material ({@code cacerts} file in the security properties directory).
* System properties are not taken into consideration.
*
* @return default SSL socket factory
*/
public static SSLConnectionSocketFactory getSocketFactory() throws
SSLInitializationException {
return new SSLConnectionSocketFactory(
SSLContexts.createDefault(), getDefaultHostnameVerifier());
}
private static String[] split(final String s) {
if (TextUtils.isBlank(s)) {
return null;
}
return s.split(" *, *");
}
/**
* Obtains default SSL socket factory with an SSL context based on system properties
* as described in
* <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html">
* Java&#x2122; Secure Socket Extension (JSSE) Reference Guide</a>.
*
* @return default system SSL socket factory
*/
public static SSLConnectionSocketFactory getSystemSocketFactory() throws
SSLInitializationException {
return new SSLConnectionSocketFactory(
(javax.net.ssl.SSLSocketFactory) javax.net.ssl.SSLSocketFactory.getDefault(),
split(System.getProperty("https.protocols")),
split(System.getProperty("https.cipherSuites")),
getDefaultHostnameVerifier());
}
private final javax.net.ssl.SSLSocketFactory socketfactory;
private final HostnameVerifier hostnameVerifier;
private final String[] supportedProtocols;
private final String[] supportedCipherSuites;
public SSLConnectionSocketFactory(final SSLContext sslContext) {
this(sslContext, getDefaultHostnameVerifier());
}
/**
* @deprecated (4.4) Use {@link #SSLConnectionSocketFactory(SSLContext,
* HostnameVerifier)}
*/
@Deprecated
public SSLConnectionSocketFactory(
final SSLContext sslContext, final X509HostnameVerifier hostnameVerifier) {
this(Args.notNull(sslContext, "SSL context").getSocketFactory(),
null, null, hostnameVerifier);
}
/**
* @deprecated (4.4) Use {@link #SSLConnectionSocketFactory(SSLContext,
* String[], String[], HostnameVerifier)}
*/
@Deprecated
public SSLConnectionSocketFactory(
final SSLContext sslContext,
final String[] supportedProtocols,
final String[] supportedCipherSuites,
final X509HostnameVerifier hostnameVerifier) {
this(Args.notNull(sslContext, "SSL context").getSocketFactory(),
supportedProtocols, supportedCipherSuites, hostnameVerifier);
}
/**
* @deprecated (4.4) Use {@link #SSLConnectionSocketFactory(javax.net.ssl.SSLSocketFactory,
* HostnameVerifier)}
*/
@Deprecated
public SSLConnectionSocketFactory(
final javax.net.ssl.SSLSocketFactory socketfactory,
final X509HostnameVerifier hostnameVerifier) {
this(socketfactory, null, null, hostnameVerifier);
}
/**
* @deprecated (4.4) Use {@link #SSLConnectionSocketFactory(javax.net.ssl.SSLSocketFactory,
* String[], String[], HostnameVerifier)}
*/
@Deprecated
public SSLConnectionSocketFactory(
final javax.net.ssl.SSLSocketFactory socketfactory,
final String[] supportedProtocols,
final String[] supportedCipherSuites,
final X509HostnameVerifier hostnameVerifier) {
this(socketfactory, supportedProtocols, supportedCipherSuites, (HostnameVerifier) hostnameVerifier);
}
/**
* @since 4.4
*/
public SSLConnectionSocketFactory(
final SSLContext sslContext, final HostnameVerifier hostnameVerifier) {
this(Args.notNull(sslContext, "SSL context").getSocketFactory(),
null, null, hostnameVerifier);
}
/**
* @since 4.4
*/
public SSLConnectionSocketFactory(
final SSLContext sslContext,
final String[] supportedProtocols,
final String[] supportedCipherSuites,
final HostnameVerifier hostnameVerifier) {
this(Args.notNull(sslContext, "SSL context").getSocketFactory(),
supportedProtocols, supportedCipherSuites, hostnameVerifier);
}
/**
* @since 4.4
*/
public SSLConnectionSocketFactory(
final javax.net.ssl.SSLSocketFactory socketfactory,
final HostnameVerifier hostnameVerifier) {
this(socketfactory, null, null, hostnameVerifier);
}
/**
* @since 4.4
*/
public SSLConnectionSocketFactory(
final javax.net.ssl.SSLSocketFactory socketfactory,
final String[] supportedProtocols,
final String[] supportedCipherSuites,
final HostnameVerifier hostnameVerifier) {
this.socketfactory = Args.notNull(socketfactory, "SSL socket factory");
this.supportedProtocols = supportedProtocols;
this.supportedCipherSuites = supportedCipherSuites;
this.hostnameVerifier = hostnameVerifier != null ? hostnameVerifier : getDefaultHostnameVerifier();
}
/**
* Performs any custom initialization for a newly created SSLSocket
* (before the SSL handshake happens).
* <p>
* The default implementation is a no-op, but could be overridden to, e.g.,
* call {@link SSLSocket#setEnabledCipherSuites(String[])}.
*
* @throws IOException may be thrown if overridden
*/
protected void prepareSocket(final SSLSocket socket) throws IOException {
}
@Override
public Socket createSocket(final HttpContext context) throws IOException {
return SocketFactory.getDefault().createSocket();
}
@Override
public Socket connectSocket(
final int connectTimeout,
final Socket socket,
final HttpHost host,
final InetSocketAddress remoteAddress,
final InetSocketAddress localAddress,
final HttpContext context) throws IOException {
Args.notNull(host, "HTTP host");
Args.notNull(remoteAddress, "Remote address");
final Socket sock = socket != null ? socket : createSocket(context);
if (localAddress != null) {
sock.bind(localAddress);
}
try {
if (connectTimeout > 0 && sock.getSoTimeout() == 0) {
sock.setSoTimeout(connectTimeout);
}
/*
if (this.log.isDebugEnabled()) {
this.log.debug("Connecting socket to " + remoteAddress + " with timeout " + connectTimeout);
}
*/
sock.connect(remoteAddress, connectTimeout);
} catch (final IOException ex) {
try {
sock.close();
} catch (final IOException ignore) {
}
throw ex;
}
// Setup SSL layering if necessary
if (sock instanceof SSLSocket) {
final SSLSocket sslsock = (SSLSocket) sock;
// this.log.debug("Starting handshake");
sslsock.startHandshake();
verifyHostname(sslsock, host.getHostName());
return sock;
} else {
return createLayeredSocket(sock, host.getHostName(), remoteAddress.getPort(), context);
}
}
@Override
public Socket createLayeredSocket(
final Socket socket,
final String target,
final int port,
final HttpContext context) throws IOException {
final SSLSocket sslsock = (SSLSocket) this.socketfactory.createSocket(
socket,
target,
port,
true);
if (supportedProtocols != null) {
sslsock.setEnabledProtocols(supportedProtocols);
} else {
// If supported protocols are not explicitly set, remove all SSL protocol versions
final String[] allProtocols = sslsock.getEnabledProtocols();
final List<String> enabledProtocols = new ArrayList<String>(allProtocols.length);
for (String protocol : allProtocols) {
if (!protocol.startsWith("SSL")) {
enabledProtocols.add(protocol);
}
}
if (!enabledProtocols.isEmpty()) {
sslsock.setEnabledProtocols(enabledProtocols.toArray(new String[enabledProtocols.size()]));
}
}
if (supportedCipherSuites != null) {
sslsock.setEnabledCipherSuites(supportedCipherSuites);
}
/*
if (this.log.isDebugEnabled()) {
this.log.debug("Enabled protocols: " + Arrays.asList(sslsock.getEnabledProtocols()));
this.log.debug("Enabled cipher suites:" + Arrays.asList(sslsock.getEnabledCipherSuites()));
}
*/
prepareSocket(sslsock);
// Android specific code to enable SNI
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "Enabling SNI for " + target);
}
try {
Method method = sslsock.getClass().getMethod("setHostname", String.class);
method.invoke(sslsock, target);
} catch (Exception ex) {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "SNI configuration failed", ex);
}
}
}
// End of Android specific code
// this.log.debug("Starting handshake");
sslsock.startHandshake();
verifyHostname(sslsock, target);
return sslsock;
}
private void verifyHostname(final SSLSocket sslsock, final String hostname) throws IOException {
try {
SSLSession session = sslsock.getSession();
if (session == null) {
// In our experience this only happens under IBM 1.4.x when
// spurious (unrelated) certificates show up in the server'
// chain. Hopefully this will unearth the real problem:
final InputStream in = sslsock.getInputStream();
in.available();
// If ssl.getInputStream().available() didn't cause an
// exception, maybe at least now the session is available?
session = sslsock.getSession();
if (session == null) {
// If it's still null, probably a startHandshake() will
// unearth the real problem.
sslsock.startHandshake();
session = sslsock.getSession();
}
}
if (session == null) {
throw new SSLHandshakeException("SSL session not available");
}
/*
if (this.log.isDebugEnabled()) {
this.log.debug("Secure session established");
this.log.debug(" negotiated protocol: " + session.getProtocol());
this.log.debug(" negotiated cipher suite: " + session.getCipherSuite());
try {
final Certificate[] certs = session.getPeerCertificates();
final X509Certificate x509 = (X509Certificate) certs[0];
final X500Principal peer = x509.getSubjectX500Principal();
this.log.debug(" peer principal: " + peer.toString());
final Collection<List<?>> altNames1 = x509.getSubjectAlternativeNames();
if (altNames1 != null) {
final List<String> altNames = new ArrayList<String>();
for (final List<?> aC : altNames1) {
if (!aC.isEmpty()) {
altNames.add((String) aC.get(1));
}
}
this.log.debug(" peer alternative names: " + altNames);
}
final X500Principal issuer = x509.getIssuerX500Principal();
this.log.debug(" issuer principal: " + issuer.toString());
final Collection<List<?>> altNames2 = x509.getIssuerAlternativeNames();
if (altNames2 != null) {
final List<String> altNames = new ArrayList<String>();
for (final List<?> aC : altNames2) {
if (!aC.isEmpty()) {
altNames.add((String) aC.get(1));
}
}
this.log.debug(" issuer alternative names: " + altNames);
}
} catch (Exception ignore) {
}
}
*/
if (!this.hostnameVerifier.verify(hostname, session)) {
final Certificate[] certs = session.getPeerCertificates();
final X509Certificate x509 = (X509Certificate) certs[0];
final X500Principal x500Principal = x509.getSubjectX500Principal();
throw new SSLPeerUnverifiedException("Host name '" + hostname + "' does not match " +
"the certificate subject provided by the peer (" + x500Principal.toString() + ")");
}
// verifyHostName() didn't blowup - good!
} catch (final IOException iox) {
// close the socket before re-throwing the exception
try {
sslsock.close();
} catch (final Exception x) { /*ignore*/ }
throw iox;
}
}
}

View File

@ -0,0 +1,85 @@
package com.example.myapplication;
import android.app.Activity;
import android.content.Context;
import android.util.Log;
import javax.net.ssl.TrustManager;
import android.webkit.WebView;
import info.guardianproject.netcipher.client.StrongBuilder;
import info.guardianproject.netcipher.client.StrongOkHttpClientBuilder;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
public class StrongBuild implements StrongBuilder.Callback<OkHttpClient> {
private static final StrongBuild ourInstance = new StrongBuild();
public static StrongBuild getInstance() {
return ourInstance;
}
public String url;
public String htmlCode;
public WebView view;
public void loadURL(String url, WebView view, Context applicationContext){
try{
this.url = url;
this.view = view;
StrongOkHttpClientBuilder.
forMaxSecurity(applicationContext).
withTorValidation().
withBestProxy().
build(StrongBuild.this);
}catch(Exception e){
e.printStackTrace();
Log.e("info", "ERROR");
}
}
@Override
public void onConnected(final OkHttpClient okHttpClient){
Log.e("info" , "CONNECTED Strong Builder");
view.loadDataWithBaseURL(null, "ASD", "text/html", "utf-8", null);
new Thread(new Runnable(){
@Override
public void run(){
try{
Request request = new Request.Builder().url(url).build();
Response response = okHttpClient.newCall(request).execute();
Log.e("info", "RESPONSE: "+response.toString());
Log.e("info", response.body().string());
htmlCode = response.body().string();
Log.d("LOADING : " ,"LOADING");
view.loadDataWithBaseURL(null, htmlCode, "text/html", "utf-8", null);
}catch(Exception e){
e.printStackTrace();
Log.e("info", "ERROR - ATTEMPTING CONNECTION TO ONION DOMAIN");
}
}
}).start();
}
@Override
public void onConnectionException(Exception e){
Log.e("info" , "Exception");
}
@Override
public void onTimeout(){
Log.e("info" , "Timeout");
}
@Override
public void onInvalid(){
Log.e("info" , "Invalid");
}
}

View File

@ -0,0 +1,64 @@
package com.example.myapplication;
import android.content.Context;
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.InterstitialAd;
import com.google.android.gms.ads.MobileAds;
public class admanager {
private static final admanager ourInstance = new admanager();
public static admanager getInstance() {
return ourInstance;
}
private InterstitialAd mInterstitialAd;
private admanager() {
}
public void initialize(Context applicationContext)
{
MobileAds.initialize(applicationContext, "ca-app-pub-5074525529134731~2926711128");
mInterstitialAd = new InterstitialAd(applicationContext);
mInterstitialAd.setAdUnitId("ca-app-pub-3940256099942544/1033173712");
implementListeners();
mInterstitialAd.loadAd(new AdRequest.Builder().build());
}
public void implementListeners()
{
mInterstitialAd.setAdListener(new AdListener() {
@Override
public void onAdLoaded() {
// Code to be executed when an ad finishes loading.
}
@Override
public void onAdFailedToLoad(int errorCode) {
mInterstitialAd.loadAd(new AdRequest.Builder().build());
}
@Override
public void onAdOpened() {
}
@Override
public void onAdLeftApplication() {
// Code to be executed when the user has left the app.
}
@Override
public void onAdClosed() {
mInterstitialAd.loadAd(new AdRequest.Builder().build());
}
});
}
public void showAd()
{
mInterstitialAd.show();
}
}

View File

@ -0,0 +1,303 @@
package com.example.myapplication;
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Color;
import android.os.Build;
import android.support.constraint.ConstraintLayout;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.util.Patterns;
import android.view.KeyEvent;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.webkit.*;
import android.widget.*;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Stack;
import static java.lang.Thread.sleep;
public class applicationController extends AppCompatActivity
{
/*View Objects*/
private WebView webView1;
private WebView webView2;
private ProgressBar progressBar;
private ConstraintLayout requestFailure;
private ConstraintLayout splashScreen;
private Button reloadButton;
private ImageButton homeButton;
private EditText searchbar;
private LinearLayout topbar;
/*helper Variables*/
String currentURL = "http://boogle.store/";
boolean isRequestError = false;
boolean hasApplicationLoaded = false;
Stack urlList = new Stack<String>();
int scroll1y=0;
int scroll2y=0;
/*Initialization*/
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_application_controller);
initializeView();
initializeProxy();
initializeAds();
}
public void initializeProxy()
{
//torProxyServer.getInstance().initialize(this,this);
}
public void initializeAds()
{
admanager.getInstance().initialize(this);
}
/*Initialization*/
public void initializeView()
{
webView1 = (WebView) findViewById(R.id.pageLoader1);
webView2 = (WebView) findViewById(R.id.pageLoader2);
progressBar = (ProgressBar) findViewById(R.id.progressBar);
requestFailure = (ConstraintLayout) findViewById(R.id.requestFailure);
splashScreen = (ConstraintLayout) findViewById(R.id.splashScreen);
reloadButton = (Button) findViewById(R.id.reloadButton);
homeButton = (ImageButton) findViewById(R.id.home);
searchbar = (EditText) findViewById(R.id.search);
topbar = (LinearLayout) findViewById(R.id.topbar);
webRequestHandler.getInstance().initialization(webView1,webView2,progressBar,searchbar,requestFailure);
webView1.bringToFront();
webView2.animate().setDuration(0).alpha(0f);
progressBar.setVisibility(View.INVISIBLE);
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
webView1.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
webView1.setBackgroundColor(Color.WHITE);
webView1.setWebViewClient(loadWebViewClient());
webView1.getSettings().setJavaScriptEnabled(true);
webView1.loadUrl("http://boogle.store/");
webView2.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
webView2.setBackgroundColor(Color.WHITE);
webView2.setWebViewClient(loadWebViewClient());
webView2.getSettings().setJavaScriptEnabled(true);
requestFailure.animate().setDuration(0).alpha(0.0f);
initializeViewClients();
}
private void initializeViewClients()
{
homeButton.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v)
{
webRequestHandler.getInstance().loadURL("http://boogle.store/");
isRequestError = false;
}
});
searchbar.setOnEditorActionListener(new EditText.OnEditorActionListener()
{
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event)
{
try
{
String url = v.getText().toString();
if(!url.startsWith("www.")&& !url.startsWith("http://")){
url = "www."+url;
}
if(!url.startsWith("http://")){
url = "http://"+url;
}
boolean isUrlValid = Patterns.WEB_URL.matcher(url).matches();
URL host = new URL(url);
Log.i("SUPER WOW",host.getHost());
if(isUrlValid && host.getHost().replace("www.","").contains("."))
{
Log.i("WOW1","WOW1");
if(host.getHost().contains(".onion")||host.getHost().contains("boogle.store")||host.getHost().contains("genesis.store"))
{
webRequestHandler.getInstance().loadURL(v.getText().toString());
}
else
{
Toast.makeText(getApplicationContext(), "Only onion urls allowed", Toast.LENGTH_SHORT).show();
}
}
else
{
webRequestHandler.getInstance().loadURL("http://boogle.store/search?q="+v.getText().toString().replaceAll(" ","+")+"&p_num=1&s_type=all");
}
}
catch (IOException e)
{
webRequestHandler.getInstance().loadURL("http://boogle.store/search?q="+v.getText().toString().replaceAll(" ","+")+"&p_num=1&s_type=all");
e.printStackTrace();
}
return false;
}
});
Log.i("HELL1","HELL1");
reloadButton.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v)
{
Log.i("HELL2","HELL2");
webRequestHandler.getInstance().loadURL(currentURL);
isRequestError = false;
}
});
}
public static String getDomainName(String url) throws URISyntaxException
{
URI uri = new URI(url);
String domain = uri.getHost();
return domain.startsWith("www.") ? domain.substring(4) : domain;
}
@TargetApi(Build.VERSION_CODES.M)
private void onChromeClientProgressChanged(int newProgress)
{
}
@Override
public void onBackPressed()
{
if(urlList.size()>0)
{
boolean crul = !currentURL.equals("http://boogle.store/");
boolean peek = !urlList.peek().equals("http://boogle.store/");
Log.i("WOW",urlList.size() + "---" + urlList.peek() + "---" + currentURL + "---" + peek);
currentURL = urlList.peek().toString();
if(!currentURL.equals(urlList.peek()) && crul)
{
webRequestHandler.getInstance().loadURL("http://boogle.store/");
}
else
{
webRequestHandler.getInstance().loadURL(urlList.pop().toString());
}
}
}
private WebViewClient loadWebViewClient()
{
WebViewClient client = new WebViewClient()
{
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
Log.i("OVERRIDING URL 1 : ","SUCCESS : " + view);
System.out.println(url);
if(!currentURL.equals(url))
{
urlList.add(currentURL);
currentURL = url;
}
if(!url.toString().contains("boogle"))
{
Log.i("OVERRIDING URL 2 : ","SUCCESS : " + url);
//admanager.getInstance().showAd();
//StrongBuild.getInstance().loadURL("https://stackoverflow.com/questions/4543349/load-local-html-in-webview",view,getApplicationContext());
}
else
{
Log.i("OVERRIDING URL 3 : ","SUCCESS : " + url);
webRequestHandler.getInstance().loadURL(url);
return true;
}
return false;
}
@Override
public void onPageFinished(WebView view, String url)
{
Log.i("APPLIED : ","SUCCESS : APPLIED");
super.onPageFinished(view, url);
webView1.animate().setDuration(250).alpha(1f);
webView2.animate().setDuration(250).alpha(1f);
if(!hasApplicationLoaded)
{
try
{
sleep(2000);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
hasApplicationLoaded = true;
splashScreen.animate().alpha(0.0f).setDuration(500).setListener(null).withEndAction((new Runnable() {
@Override
public void run()
{
splashScreen.setVisibility(View.GONE);
}
}));
}
if(!isRequestError)
{
requestFailure.animate().alpha(0.0f).setDuration(500).setListener(null).withEndAction((new Runnable() {
@Override
public void run()
{
requestFailure.setVisibility(View.GONE);
//reloadButton.setEnabled(false);
}
}));
}
isRequestError = false;
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(searchbar.getWindowToken(), 0);
}
@Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)
{
Log.i("SUPME3 : ","ERROR");
//reloadButton.setEnabled(true);
System.out.println("SUP2");
requestFailure.setVisibility(View.VISIBLE);
requestFailure.animate().alpha(1.0f);
isRequestError = true;
super.onReceivedError(view, errorCode, description, failingUrl);
}
};
return client;
}
}

View File

@ -0,0 +1,52 @@
package com.example.myapplication;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import info.guardianproject.netcipher.NetCipher;
import info.guardianproject.netcipher.proxy.OrbotHelper;
import android.util.Log;
import info.guardianproject.netcipher.proxy.StatusCallback;
public class torProxyServer {
private static final torProxyServer ourInstance = new torProxyServer();
public static torProxyServer getInstance() {
return ourInstance;
}
private torProxyServer() {
}
public void initialize(Context applicationContext, final Activity activity)
{
if (OrbotHelper.isOrbotInstalled(activity))
{
NetCipher.useTor();
OrbotHelper.get(activity).statusTimeout(60000).addStatusCallback(new StatusCallback(){
@Override
public void onEnabled(Intent intent){ Log.d("Log Started","Log Started"); }
@Override
public void onStarting() { }
@Override
public void onStopping(){ }
@Override
public void onDisabled(){ }
@Override
public void onStatusTimeout(){ }
@Override
public void onNotYetInstalled(){ }
}).init();
}
else
{
Intent intent = OrbotHelper.getOrbotInstallIntent(activity);
activity.startActivityForResult(intent,0);
}
}
}

View File

@ -0,0 +1,184 @@
package com.example.myapplication;
import android.os.Message;
import android.support.constraint.ConstraintLayout;
import android.util.Log;
import android.view.View;
import android.webkit.WebView;
import android.widget.EditText;
import android.widget.ProgressBar;
import cz.msebera.android.httpclient.HttpResponse;
import cz.msebera.android.httpclient.client.HttpClient;
import cz.msebera.android.httpclient.client.methods.HttpGet;
import cz.msebera.android.httpclient.impl.client.DefaultHttpClient;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import android.os.Handler;
public class webRequestHandler
{
private static final webRequestHandler ourInstance = new webRequestHandler();
private WebView[] view = new WebView[2];;
private int viewIndex = 1;
private int currentViewIndex = 0;
private String html = "";
private String baseURL = "";
private Boolean isLoading = false;
private ProgressBar progressBar;
private EditText searchbar;
private HttpClient client = null;
private Thread clientThread = null;
private Boolean isRendering = false;
private ConstraintLayout requestFailure;
public static webRequestHandler getInstance() {
return ourInstance;
}
private webRequestHandler()
{
}
public void initialization(WebView view1,WebView view2,ProgressBar progressBar,EditText searchbar,ConstraintLayout requestFailure)
{
this.view[0] = view1;
this.view[1] = view2;
this.progressBar = progressBar;
this.searchbar = searchbar;
this.requestFailure = requestFailure;
createUpdateUiHandler();
}
public void loadURL(final String url)
{
try
{
progressBar.setVisibility(View.VISIBLE);
if(isRendering)
{
return;
}
if(!isLoading)
{
searchbar.setText(url.replace("http://boogle.store","http://genesis.onion"));
}
else if(client!=null)
{
client.getConnectionManager().shutdown();
isLoading = false;
}
if(clientThread!=null)
{
clientThread.interrupt();
}
client = new DefaultHttpClient();
}
catch (Exception ex)
{
Log.d("SUPER WOW1","SUPER WOW");
}
clientThread = new Thread(new Runnable() {
@Override
public void run() {
try
{
isLoading = true;
HttpGet request = new HttpGet(url);
baseURL = url;
HttpResponse response = client.execute(request);
InputStream in = response.getEntity().getContent();
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
StringBuilder str = new StringBuilder();
String line = null;
while((line = reader.readLine()) != null)
{
if(!isLoading)
{
return;
}
str.append(line);
}
in.close();
html = str.toString();
Message message = new Message();
message.what = MESSAGE_UPDATE_TEXT_CHILD_THREAD;
updateUIHandler.sendMessage(message);
}
catch (Exception e)
{
Message message = new Message();
message.what = INTERNET_ERROR;
updateUIHandler.sendMessage(message);
Log.d("SUPER WOW2","SUPER WOW");
e.printStackTrace();
}
}
});
clientThread.start();
}
private Handler updateUIHandler = null;
private final static int MESSAGE_UPDATE_TEXT_CHILD_THREAD =1;
private final static int INTERNET_ERROR =2;
public WebView getView()
{
return view[currentViewIndex];
}
private void createUpdateUiHandler()
{
if(updateUIHandler == null)
{
updateUIHandler = new Handler()
{
@Override
public void handleMessage(Message msg) {
Log.i("APPLYING : ","SUCCESS : APPLYING");
if(msg.what == MESSAGE_UPDATE_TEXT_CHILD_THREAD && isLoading &&!isRendering)
{
isRendering = true;
view[viewIndex].animate().setDuration(0).alpha(0f);
view[viewIndex].bringToFront();
view[viewIndex].loadDataWithBaseURL(baseURL,html, "text/html", "utf-8", null);
if(viewIndex==1)
{
viewIndex = 0;
currentViewIndex =1;
}
else
{
viewIndex = 1;
currentViewIndex=0;
}
view[currentViewIndex].animate().setDuration(0).alpha(0f).withEndAction((new Runnable() {
@Override
public void run()
{
isLoading = false;
progressBar.setVisibility(View.INVISIBLE);
isRendering = false;
}
}));
}
else if (msg.what == INTERNET_ERROR)
{
isRendering = false;
isLoading = false;
progressBar.setVisibility(View.INVISIBLE);
requestFailure.setVisibility(View.VISIBLE);
requestFailure.animate().alpha(1f).setDuration(500);
}
}
};
}
}
}

View File

@ -0,0 +1,34 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0"/>
<item
android:color="#00000000"
android:offset="1.0"/>
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor="#00000000"
android:strokeWidth="1"/>
</vector>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#0066ff"
android:endColor="#4d94ff"
android:angle="90"
/>
</shape>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape
android:shape="rectangle">
<stroke android:width="1px" android:color="#bfbfbf" />
<solid android:color="#ffffff" />
</shape>
</item>
<item android:top="1px" android:bottom="1px">
<shape
android:shape="rectangle">
<stroke android:width="1px" android:color="#ffffff" />
<solid android:color="#ffffff" />
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,4 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<size android:width="2dp" />
<solid android:color="#3385ff"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<item android:drawable="@android:color/black" />
<path android:fillColor="#008577"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- disabled state-->
<item
android:state_enabled="false"
android:drawable="@color/holo_gray"
>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp" >
<!-- you can use any color you want I used here gray color-->
<solid android:color="#d9d9d9"/>
<corners android:radius="25dp"/>
</shape>
</item>
<!-- pressed state / clicked state -->
<item
android:state_pressed="true"
android:state_enabled="true"
android:drawable="@color/holo_gray"
>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp" >
<!-- you can use any color you want I used here gray color-->
<solid android:color="#d9d9d9"/>
<corners android:radius="25dp"/>
</shape>
</item>
<!-- focused state -->
<item
android:state_focused="true"
android:state_enabled="true"
android:drawable="@color/holo_gray"
>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp" >
<!-- you can use any color you want I used here gray color-->
<solid android:color="#d9d9d9"/>
<corners android:radius="25dp"/>
</shape>
</item>
<!-- enabled state / default state-->
<item
android:state_enabled="true"
android:drawable="@android:color/white"
>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp" >
<!-- you can use any color you want I used here gray color-->
<solid android:color="#d9d9d9"/>
<corners android:radius="25dp"/>
</shape>
</item>
</selector>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/progress">
<rotate android:toDegrees="400">
<shape
android:shape="ring"
android:thickness="4dp">
<solid android:color="#ffffff" />
</shape>
</rotate>
</item>
</layer-list>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp" >
<!-- you can use any color you want I used here gray color-->
<solid android:color="#d9d9d9"/>
<corners android:radius="25dp"/>
</shape>
</item>
<item android:state_pressed="false" >
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<!-- you can use any color you want I used here gray color-->
<solid android:color="#f2f2f2"/>
<corners android:radius="25dp"/>
</shape>
</item>
</selector>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#ffffff"
android:endColor="@android:color/transparent"
android:angle="90" />
</shape>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp" >
<!-- you can use any color you want I used here gray color-->
<solid android:color="#d9d9d9"/>
<corners android:radius="5dp"/>
</shape>
</item>
<item android:state_pressed="false" >
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<!-- you can use any color you want I used here gray color-->
<solid android:color="#ffffff"/>
<corners android:radius="5dp"/>
</shape>
</item>
</selector>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp" >
<!-- you can use any color you want I used here gray color-->
<solid android:color="#d9d9d9"/>
<corners android:radius="2dp"/>
</shape>
</item>
<item android:state_pressed="false" >
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<!-- you can use any color you want I used here gray color-->
<solid android:color="#ffffff"/>
<corners android:radius="2dp"/>
</shape>
</item>
</selector>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- State when a row is being pressed, but hasn't yet been activated (finger down) -->
<item android:state_pressed="true" android:color="#000000" />
<!-- When the view is "activated". In SINGLE_CHOICE_MODE, it flags the active row
of a ListView -->
<item android:state_activated="true" android:color="#000000" />
<!-- Default, "just hangin' out" state. -->
<item android:color="@android:color/transparent" />
</selector>

View File

@ -0,0 +1,199 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".applicationController">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<WebView
android:id="@+id/pageLoader1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="55dp"
tools:layout_editor_absoluteY="8dp" tools:layout_editor_absoluteX="8dp">
</WebView>
<WebView
android:id="@+id/pageLoader2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="55dp"
tools:layout_editor_absoluteY="8dp" tools:layout_editor_absoluteX="8dp">
</WebView>
</FrameLayout>
<android.support.constraint.ConstraintLayout
android:id="@+id/requestFailure"
android:layout_height="match_parent"
app:layout_constraintTop_toTopOf="parent"
android:background="#ffffff"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="match_parent"
>
<ImageButton
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f8f8f8"
android:id="@+id/errorBack" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<TextView
android:layout_width="match_parent"
android:textAlignment="viewStart"
android:textStyle="bold"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text=" Opps! Some Thing Went Wrong"
android:textColor="#4d4d4d"
android:ems="10"
android:id="@+id/editText"
app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="74dp"
app:layout_constraintEnd_toEndOf="parent"/>
<Button
android:text="Reload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/reloadButton"
android:background="@drawable/shape"
android:textColor="#000000"
app:layout_constraintBottom_toBottomOf="parent"
android:radius="1dp"
android:bottomRightRadius="10dp"
android:bottomLeftRadius="10dp"
android:topLeftRadius="10dp"
android:topRightRadius="10dp"
android:layout_marginBottom="36dp" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_bias="0.498" app:layout_constraintEnd_toEndOf="parent"/>
<TextView
android:text="These might be the problems you are facing\n\n\u2022 Webpage or Website might be down\n\u2022 Your Internet connection might be poor\n\u2022 You might be using a proxy\n\u2022 Website might be blocked by firewall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView"
android:textColor="#4d4d4d"
app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="120dp"
app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="10dp"
android:layout_marginEnd="10dp" app:layout_constraintEnd_toEndOf="parent"/>
<ImageView
android:layout_width="205dp"
android:layout_height="0dp" app:srcCompat="@drawable/interneticon"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
app:layout_constraintBottom_toTopOf="@+id/reloadButton" android:layout_marginBottom="35dp"
android:layout_marginTop="35dp"/>
</android.support.constraint.ConstraintLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="55dp"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="55dp"
android:id="@+id/topbar"
android:orientation="horizontal"
android:elevation="10dp"
android:background="@drawable/border"
android:gravity="left" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent">
<ImageButton
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="10.5dp"
android:id="@+id/home"
android:bottomRightRadius="3dp"
android:bottomLeftRadius="3dp"
android:topLeftRadius="3dp"
android:scaleType="fitCenter"
android:src="@drawable/homeicon"
android:background="@drawable/pressedcolor"
android:topRightRadius="3dp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="16dp"
android:textColor="#333333"
android:selectAllOnFocus="true"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:textColorHighlight="#b3d1ff"
android:background="@drawable/searchbar"
android:textCursorDrawable="@drawable/cursorcolor"
android:hint="Search or type web address"
android:text="http://genesis.onion"
android:ems="10"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_marginRight="10dp"
android:layout_marginLeft="5dp"
android:inputType="text"
android:maxLines="1"
android:id="@+id/search" android:layout_weight="1"/>
</LinearLayout>
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ProgressBar
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="110dp"
android:indeterminateTint="#005ce6"
android:id="@+id/progressBar"
android:indeterminateOnly="true"
android:progress="50" app:layout_constraintTop_toTopOf="parent"
/>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent" android:id="@+id/splashScreen"
android:background="@drawable/backgradient"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintVertical_bias="1.0">
<ProgressBar
style="?android:attr/progressBarStyle"
android:layout_width="95dp"
android:layout_height="95dp"
android:indeterminateTint="#ffffff"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="80dp"/>
<ImageView
android:layout_width="100dp"
android:layout_height="70dp" app:srcCompat="@drawable/logolarge"
android:id="@+id/imageView_loading" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="80dp"/>
<TextView
android:text="Genesis Search Engine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ffffff"
android:textStyle="bold"
android:id="@+id/textView3"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="16dp"
app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="35dp"
android:layout_marginEnd="231dp" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"/>
<TextView
android:text="Loading Please Wait"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ffffff"
android:textStyle="bold"
android:id="@+id/notification" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginTop="50dp" android:layout_marginStart="76dp" android:layout_marginEnd="76dp"/>
</android.support.constraint.ConstraintLayout>
</FrameLayout>
</android.support.constraint.ConstraintLayout>

View File

@ -0,0 +1,151 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<WebView
android:id="@+id/pageLoader1"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout_editor_absoluteY="8dp" tools:layout_editor_absoluteX="8dp">
</WebView>
<android.support.constraint.ConstraintLayout
android:id="@+id/requestFailure"
android:layout_height="match_parent"
app:layout_constraintTop_toTopOf="parent"
android:background="#ffffff"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="match_parent"
>
<ImageButton
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f8f8f8"
android:id="@+id/errorBack" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<TextView
android:layout_width="match_parent"
android:textAlignment="viewStart"
android:textStyle="bold"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text=" Opps! Some Thing Went Wrong"
android:textColor="#4d4d4d"
android:ems="10"
android:id="@+id/editText"
app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="104dp"
app:layout_constraintEnd_toEndOf="parent"/>
<Button
android:text="Reload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/reloadButton"
android:background="@drawable/shape"
android:textColor="#000000"
app:layout_constraintBottom_toBottomOf="parent"
android:radius="1dp"
android:bottomRightRadius="10dp"
android:bottomLeftRadius="10dp"
android:topLeftRadius="10dp"
android:topRightRadius="10dp"
android:layout_marginBottom="36dp" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_bias="0.498" app:layout_constraintEnd_toEndOf="parent"/>
<TextView
android:text="These might be the problems you are facing\n\n\u2022 Webpage or Website might be down\n\u2022 Your Internet connection might be poor\n\u2022 You might be using a proxy\n\u2022 Website might be blocked by firewall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView"
android:textColor="#4d4d4d"
app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="170dp"
app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="10dp"
android:layout_marginEnd="10dp" app:layout_constraintEnd_toEndOf="parent"/>
<ImageView
android:layout_width="53dp"
android:layout_height="53dp" app:srcCompat="@mipmap/ic_launcher_round_v1"
android:id="@+id/imageView"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="4dp"
android:layout_marginStart="4dp"/>
<TextView
android:text="Genesis Search Engine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textSize="20sp"
android:textColor="#4d4d4d"
android:id="@+id/textView2"
app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="68dp"/>
<ImageView
android:layout_width="205dp"
android:layout_height="0dp" app:srcCompat="@drawable/interneticon"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
app:layout_constraintBottom_toTopOf="@+id/reloadButton" android:layout_marginBottom="35dp"
android:layout_marginTop="35dp"/>
</android.support.constraint.ConstraintLayout>
<ProgressBar
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="4dp"
android:id="@+id/progressBar"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:max="100"
android:progress="0" app:layout_constraintTop_toTopOf="parent"
/>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent" android:id="@+id/splashScreen"
android:background="@drawable/backgradient"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintVertical_bias="1.0">
<ProgressBar
style="?android:attr/progressBarStyle"
android:layout_width="95dp"
android:layout_height="95dp"
android:indeterminateTint="#ffffff"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="80dp"/>
<ImageView
android:layout_width="100dp"
android:layout_height="70dp" app:srcCompat="@drawable/logolarge"
android:id="@+id/imageView_loading" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="80dp"/>
<TextView
android:text="Genesis Search Engine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ffffff"
android:textStyle="bold"
android:id="@+id/textView3"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="16dp"
app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="35dp"
android:layout_marginEnd="231dp" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"/>
<TextView
android:text="Loading Please Wait"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ffffff"
android:textStyle="bold"
android:id="@+id/notification" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginTop="50dp" android:layout_marginStart="76dp" android:layout_marginEnd="76dp"/>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent" android:id="@+id/splashScreen"
android:background="@drawable/backgradient"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintVertical_bias="1.0">
<ImageView
android:layout_width="100dp"
android:layout_height="70dp" app:srcCompat="@drawable/logolarge"
android:id="@+id/imageView_loading" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="80dp"/>
<TextView
android:text="Genesis Search Engine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ffffff"
android:textStyle="bold"
android:id="@+id/textView3"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="16dp"
app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="35dp"
android:layout_marginEnd="231dp" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"/>
<TextView
android:text="Loading Please Wait"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ffffff"
android:textStyle="bold"
android:id="@+id/notification" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginTop="50dp" android:layout_marginStart="76dp" android:layout_marginEnd="76dp"/>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#f2f2f2</item>
<item name="colorPrimaryDark">#f2f2f2</item>
<item name="colorAccent">#f2f2f2</item>
<item name="android:windowBackground">@drawable/backgradient</item>
<item name="android:windowLightStatusBar">true</item>
</style>
</resources>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#000000</color>
<color name="colorPrimaryDark">#000000</color>
<color name="colorAccent">#000000</color>
<color name="blue">#0066ff</color>
<color name="holo_gray">#b3b3b3</color>
</resources>

View File

@ -0,0 +1,3 @@
<resources>
<string name="app_name">Genesis</string>
</resources>

View File

@ -0,0 +1,14 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#f9f9f9</item>
<item name="colorPrimaryDark">#f9f9f9</item>
<item name="colorAccent">#f9f9f9</item>
<item name="android:windowBackground">@drawable/backgradient</item>
<item name="android:windowLightStatusBar">true</item>
</style>
</resources>

View File

@ -0,0 +1,17 @@
package com.example.myapplication
import org.junit.Test
import org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}

26
build.gradle Normal file
View File

@ -0,0 +1,26 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.20'
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

15
gradle.properties Normal file
View File

@ -0,0 +1,15 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,6 @@
#Sat Feb 23 18:52:38 PKT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

172
gradlew vendored Normal file
View File

@ -0,0 +1,172 @@
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

84
gradlew.bat vendored Normal file
View File

@ -0,0 +1,84 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

1
settings.gradle Normal file
View File

@ -0,0 +1 @@
include ':app'