All Projects → rakshakhegde → Daggerandroidinjector

rakshakhegde / Daggerandroidinjector

Dagger Sample Project on how to use the new dagger-android module for Dagger v2.11

Programming Languages

java
68154 projects - #9 most used programming language
kotlin
9241 projects

Projects that are alternatives of or similar to Daggerandroidinjector

Coinverse
Coinverse Open App is the first audiocast app for cryptocurrency news. 🚀
Stars: ✭ 133 (-31.79%)
Mutual labels:  sample, dagger
Materialistic
A material-design Hacker News Android reader
Stars: ✭ 2,163 (+1009.23%)
Mutual labels:  dagger
Randomdata
Random data generator
Stars: ✭ 157 (-19.49%)
Mutual labels:  sample
Unitymathreference
Math reference for games and more. All visualized in Unity3D.
Stars: ✭ 166 (-14.87%)
Mutual labels:  sample
Applicationprovider
Retrieve the android application and the current activity from anywhere
Stars: ✭ 162 (-16.92%)
Mutual labels:  dagger
Reactnativeuniversal
A demonstration of sharing javascript react-native code between mobile, desktop and web environments
Stars: ✭ 178 (-8.72%)
Mutual labels:  sample
Play Scala Isolated Slick Example
Example Play Slick Project
Stars: ✭ 155 (-20.51%)
Mutual labels:  sample
Openui5 Sample App
OpenUI5 Sample App
Stars: ✭ 193 (-1.03%)
Mutual labels:  sample
Fluttergames
Flutter app for purchasing and renting games.
Stars: ✭ 182 (-6.67%)
Mutual labels:  sample
Kotlin Full Stack Application Demo
Full-stack demo application written with Kotlin MPP
Stars: ✭ 165 (-15.38%)
Mutual labels:  sample
Play Java Starter Example
Play starter project in Java (ideal for new users!)
Stars: ✭ 164 (-15.9%)
Mutual labels:  sample
Cpp Awesome Pack
Awesome Sample Pack of C/C++ Codes
Stars: ✭ 162 (-16.92%)
Mutual labels:  sample
Newgank
Cool Android client for gankio (Java).
Stars: ✭ 179 (-8.21%)
Mutual labels:  dagger
Pointasnl
PointASNL: Robust Point Clouds Processing using Nonlocal Neural Networks with Adaptive Sampling (CVPR 2020)
Stars: ✭ 159 (-18.46%)
Mutual labels:  sample
Nodejs Docs Samples
Node.js samples for Google Cloud Platform products.
Stars: ✭ 2,309 (+1084.1%)
Mutual labels:  sample
Workoutwotch
Repository for my video series on building an iOS app in .NET.
Stars: ✭ 156 (-20%)
Mutual labels:  sample
Clean Architecture Swiftui
SwiftUI sample app using Clean Architecture. Examples of working with CoreData persistence, networking, dependency injection, unit testing, and more.
Stars: ✭ 2,925 (+1400%)
Mutual labels:  sample
Cognitive Face Windows
Windows SDK for the Microsoft Face API, part of Cognitive Services
Stars: ✭ 175 (-10.26%)
Mutual labels:  sample
Play Scala Websocket Example
Example Play Scala application showing WebSocket use with Akka actors
Stars: ✭ 194 (-0.51%)
Mutual labels:  sample
Cognitive Face Ios
iOS SDK for the Microsoft Face API, part of Cognitive Services
Stars: ✭ 191 (-2.05%)
Mutual labels:  sample

BuddyBuild Continuous Integration

Dagger Android Injector

Kotlin branch here

Update: Latest Dagger 2.11 has provided some helper classes. Check out App.java for the updated simplified usage.

Reddit discussion

Sample project to demonstrate how to use the new dagger-android module in latest Dagger v2.11. Along with Proguard rules. Also shows MVVM pattern and Unit Test setup with Mockito on the side.

Show some ❤️

GitHub stars GitHub forks GitHub watchers GitHub followers
Twitter Follow

Motivation

Right now you maybe getting the Application instance from Activity and injecting ("hydrating") instances based off of that. But the latest version of dagger basically decouples your Activity from knowing who your Injector is.

So this sample project was built because I myself spent a bit of time getting dagger-android module setup at my company Instavans. There are things like getting all the correct library versions to work together. So here is a working starting point on how to use Dagger's @ContributesAndroidInjector which you can build upon.

(click on the images to go to the source)

MainActivity Demo Injectors Module Demo

License

Copyright 2017 Rakshak R.Hegde

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].