Skip to content

Commit cfd045f

Browse files
author
arif
committed
initial commit
0 parents  commit cfd045f

File tree

112 files changed

+5027
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+5027
-0
lines changed

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
.externalNativeBuild

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
apply plugin: 'com.android.application'
2+
3+
apply plugin: 'realm-android'
4+
5+
apply plugin: 'kotlin-android'
6+
7+
apply plugin: 'kotlin-android-extensions'
8+
9+
android {
10+
compileSdkVersion 26
11+
defaultConfig {
12+
applicationId "com.app.launcher.hash"
13+
minSdkVersion 15
14+
targetSdkVersion 26
15+
versionCode 1
16+
versionName "1.0"
17+
vectorDrawables.useSupportLibrary = true
18+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
19+
}
20+
buildTypes {
21+
release {
22+
minifyEnabled false
23+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
24+
}
25+
}
26+
}
27+
28+
dependencies {
29+
implementation fileTree(dir: 'libs', include: ['*.jar'])
30+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
31+
implementation "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion"
32+
implementation "com.android.support.constraint:constraint-layout:$rootProject.constraintLayoutVersion"
33+
implementation "com.google.android.gms:play-services-awareness:$rootProject.playServicesVersion"
34+
implementation "com.google.dagger:dagger:$rootProject.dagger2Version"
35+
implementation "com.google.dagger:dagger-android-support:$rootProject.dagger2Version"
36+
implementation "com.github.bumptech.glide:glide:$rootProject.glideVersion"
37+
implementation "io.reactivex.rxjava2:rxjava:$rootProject.rxjava2Version"
38+
implementation "io.reactivex.rxjava2:rxandroid:$rootProject.rxandroidVersion"
39+
implementation "com.squareup.retrofit2:retrofit:$rootProject.retrofitVersion"
40+
implementation "com.squareup.retrofit2:converter-gson:$rootProject.retrofitVersion"
41+
implementation "com.squareup.retrofit2:adapter-rxjava2:$rootProject.retrofitVersion"
42+
implementation "com.facebook.stetho:stetho-okhttp3:$rootProject.stethoOkhttp3Version"
43+
implementation "com.android.support:cardview-v7:$rootProject.supportLibraryVersion"
44+
implementation "com.android.support:recyclerview-v7:$rootProject.supportLibraryVersion"
45+
implementation "com.android.support:support-v4:$rootProject.supportLibraryVersion"
46+
implementation "com.android.support:customtabs:$rootProject.supportLibraryVersion"
47+
implementation "com.android.support:palette-v7:$rootProject.supportLibraryVersion"
48+
implementation "com.android.support:support-vector-drawable:$rootProject.supportLibraryVersion"
49+
implementation "com.android.support:animated-vector-drawable:$rootProject.supportLibraryVersion"
50+
implementation "com.github.nisrulz:sensey:$rootProject.senseyVersion"
51+
implementation "com.journeyapps:zxing-android-embedded:$rootProject.zxingAndroidVersion"
52+
implementation "com.jakewharton.rxbinding2:rxbinding-appcompat-v7:$rootProject.rxBindings"
53+
debugCompile "com.facebook.stetho:stetho:$rootProject.stethoVersion"
54+
debugCompile "com.uphyca:stetho_realm:$rootProject.stethoRealmVersion"
55+
annotationProcessor "com.google.dagger:dagger-compiler:$rootProject.dagger2Version"
56+
annotationProcessor "com.google.dagger:dagger-android-processor:$rootProject.dagger2Version"
57+
testImplementation 'junit:junit:4.12'
58+
androidTestImplementation 'com.android.support.test:runner:1.0.1'
59+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
60+
}

app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.app.launcher.yogi
2+
3+
import android.support.test.InstrumentationRegistry
4+
import android.support.test.runner.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getTargetContext()
22+
assertEquals("com.app.launcher.yogi", appContext.packageName)
23+
}
24+
}

app/src/debug/AndroidManifest.xml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:tools="http://schemas.android.com/tools">
5+
6+
<application
7+
tools:replace="android:name"
8+
android:name="application.DebugApplication">>
9+
</application>
10+
11+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package application;
2+
3+
import com.app.launcher.hash.HashApp;
4+
import com.facebook.stetho.Stetho;
5+
import com.uphyca.stetho_realm.RealmInspectorModulesProvider;
6+
7+
public class DebugApplication extends HashApp {
8+
9+
@Override
10+
public void onCreate() {
11+
super.onCreate();
12+
Stetho.initialize(
13+
Stetho.newInitializerBuilder(this)
14+
.enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
15+
.enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build())
16+
.build());
17+
}
18+
}

app/src/main/AndroidManifest.xml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
package="com.app.launcher.hash">
5+
6+
<uses-sdk tools:overrideLibrary="android.support.customtabs" />
7+
8+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
9+
<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
10+
<uses-permission android:name="android.permission.SET_WALLPAPER" />
11+
12+
<application
13+
android:name=".HashApp"
14+
android:allowBackup="true"
15+
android:label="@string/app_name"
16+
android:icon="@mipmap/ic_launcher"
17+
android:roundIcon="@mipmap/ic_launcher_round"
18+
android:supportsRtl="true"
19+
android:theme="@style/AppTheme">
20+
<activity
21+
android:name=".ui.home.HomeActivity"
22+
android:excludeFromRecents="true"
23+
android:launchMode="singleTask"
24+
android:stateNotNeeded="true"
25+
android:windowSoftInputMode="adjustPan"
26+
android:theme="@style/AppTheme.Wallpaper">
27+
<intent-filter>
28+
<action android:name="android.intent.action.MAIN" />
29+
30+
<category android:name="android.intent.category.HOME" />
31+
<category android:name="android.intent.category.DEFAULT" />
32+
</intent-filter>
33+
</activity>
34+
<activity
35+
android:name=".ui.applist.AppsListActivity"
36+
android:theme="@style/AppTheme.Wallpaper" />
37+
<activity
38+
android:name="com.journeyapps.barcodescanner.CaptureActivity"
39+
android:screenOrientation="portrait"
40+
tools:replace="screenOrientation" />
41+
42+
<meta-data
43+
android:name="com.google.android.awareness.API_KEY"
44+
android:value="AIzaSyDfXFXMRADy4YKykohhJNLzGbUSZY0131s" />
45+
<meta-data
46+
android:name="com.google.android.geo.API_KEY"
47+
android:value="AIzaSyDuPDM1Gu3V-lH49ooB65eO1ROz8ow6hOg" />
48+
<meta-data
49+
android:name="com.google.android.nearby.messages.API_KEY"
50+
android:value="AIzaSyDfXFXMRADy4YKykohhJNLzGbUSZY0131s" />
51+
52+
<activity android:name=".ui.onboarding.OnboardingActivity"></activity>
53+
</application>
54+
55+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package com.app.launcher.hash;
2+
3+
import android.app.Activity;
4+
import android.app.Application;
5+
6+
import com.app.launcher.hash.injection.component.DaggerApplicationComponent;
7+
8+
import javax.inject.Inject;
9+
10+
import dagger.android.AndroidInjector;
11+
import dagger.android.DispatchingAndroidInjector;
12+
import dagger.android.HasActivityInjector;
13+
import io.realm.Realm;
14+
15+
/**
16+
* Created by arif on 07/11/17.
17+
*/
18+
19+
public class HashApp extends Application implements HasActivityInjector {
20+
21+
@Inject
22+
DispatchingAndroidInjector<Activity> activityDispatchingAndroidInjector;
23+
24+
@Override
25+
public void onCreate() {
26+
super.onCreate();
27+
28+
Realm.init(this);
29+
30+
DaggerApplicationComponent
31+
.builder()
32+
.application(this)
33+
.build()
34+
.inject(this);
35+
}
36+
37+
@Override
38+
public AndroidInjector<Activity> activityInjector() {
39+
return activityDispatchingAndroidInjector;
40+
}
41+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package com.app.launcher.hash.data.model;
2+
3+
import io.realm.RealmObject;
4+
import io.realm.annotations.Index;
5+
6+
/**
7+
* Created by arif on 03/11/17.
8+
*/
9+
10+
public class App extends RealmObject{
11+
12+
@Index
13+
private String name; // app name
14+
private String pckgName; //package name
15+
private int iconResource; // app icon
16+
17+
public String getPckgName() {
18+
return pckgName;
19+
}
20+
21+
public void setPckgName(String pckgName) {
22+
this.pckgName = pckgName;
23+
}
24+
25+
public String getName() {
26+
return name;
27+
}
28+
29+
public void setName(String name) {
30+
this.name = name;
31+
}
32+
33+
public int getIconResource() {
34+
return iconResource;
35+
}
36+
37+
public void setIconResource(int iconResource) {
38+
this.iconResource = iconResource;
39+
}
40+
}
41+
42+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
package com.app.launcher.hash.data.model;
2+
3+
import com.google.gson.annotations.Expose;
4+
import com.google.gson.annotations.SerializedName;
5+
6+
public class Article {
7+
8+
@SerializedName("author")
9+
@Expose
10+
private String author;
11+
@SerializedName("title")
12+
@Expose
13+
private String title;
14+
@SerializedName("description")
15+
@Expose
16+
private String description;
17+
@SerializedName("url")
18+
@Expose
19+
private String url;
20+
@SerializedName("urlToImage")
21+
@Expose
22+
private String urlToImage;
23+
@SerializedName("publishedAt")
24+
@Expose
25+
private String publishedAt;
26+
27+
public String getAuthor() {
28+
return author;
29+
}
30+
31+
public void setAuthor(String author) {
32+
this.author = author;
33+
}
34+
35+
public String getTitle() {
36+
return title;
37+
}
38+
39+
public void setTitle(String title) {
40+
this.title = title;
41+
}
42+
43+
public String getDescription() {
44+
return description;
45+
}
46+
47+
public void setDescription(String description) {
48+
this.description = description;
49+
}
50+
51+
public String getUrl() {
52+
return url;
53+
}
54+
55+
public void setUrl(String url) {
56+
this.url = url;
57+
}
58+
59+
public String getUrlToImage() {
60+
return urlToImage;
61+
}
62+
63+
public void setUrlToImage(String urlToImage) {
64+
this.urlToImage = urlToImage;
65+
}
66+
67+
public String getPublishedAt() {
68+
return publishedAt;
69+
}
70+
71+
public void setPublishedAt(String publishedAt) {
72+
this.publishedAt = publishedAt;
73+
}
74+
75+
}

0 commit comments

Comments
 (0)