:syringe: Transfuse - A Dependency Injection and Integration framework for Google Android

Overview

Transfuse Transfuse

transfuse Build Status Maven Central

Transfuse is a Java Dependency Injection (DI) and integration library geared specifically for the Google Android API.

There are several key features that make Transfuse a great framework to use with Android:

  • Dependency Injection - Transfuse implements the JSR-330 standard annotations and passes the included unit tests.

  • POJO Components - Transfuse gives users the ability to develop Android components in Plain Old Java Objects (POJO), enabling a testable, decoupled and flexible style.

  • Compile Time Code Generation - Transfuse is remarkably small, lightweight and fast due to the technique of generating supporting code at compile time.

  • Manifest Management - Transfuse manages the Android Manifest, eliminating the duplicated effort of declaring and registering components.

All of these features help eliminate boilerplate plumbing code and make Android applications much easier to write.

Example

Using Transfuse, an Android Activity looks like the following:

@Activity(label = "@string/app_name")
@Layout(R.layout.main)
public class HelloTransfuse {

    @Inject @View(R.id.textview)
    TextView textView;

    @Inject @Resource(R.string.hello)
    String helloText;

    @OnCreate
    public void hello() {
        textView.setText(helloText);
    }
}
  1. Now, Activities no longer extend the android.app.Activity class.

  2. The Android Activity lifecycle is handled via lightweight events. Any component within the injection graph may define event methods to be called during those phases of the lifecycle.

  3. All specialty injections, such as injecting View elements, are designated with qualifier injections (@View, @Resource, etc.).

  4. Activity Manifest metadata, such as the label, are now defined on the class level instead of the AndroidManifest.xml file. This puts all the relevant information regarding the Activity in one place. Transfuse handles the job of registering the Activity and all the associated metadata in the AndroidManifest.xml file.

Interested? Check out the website for details.

Download

You may download Transfuse as a Maven dependency:

<dependency>
    <groupId>org.androidtransfuse</groupId>
    <artifactId>transfuse</artifactId>
    <version>${transfuse.version}</version>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>org.androidtransfuse</groupId>
    <artifactId>transfuse-api</artifactId>
    <version>${transfuse.version}</version>
</dependency>

or Gradle:

apt "org.androidtransfuse:transfuse:${transfuseVersion}"
compile "org.androidtransfuse:transfuse-api:${transfuseVersion}"

Or from Maven Central.

License

Copyright 2011-2015 John Ericksen

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.
Comments
  • How to inject Google analytics

    How to inject Google analytics

    I'm trying to inject Google analytics v4 using the following code:

        @Provides
        @Singleton
        @Named(Constants.SERVICE_TRACKER)
        Tracker getTrackerService(Application application) {
            GoogleAnalytics analytics = GoogleAnalytics.getInstance(application);
            return analytics.newTracker(R.xml.app_tracker);
        }
    

    The generated code ends up in Tracker$$UnscopedProvider$$0.java, which tries to inject the Application by calling "this.getApplication()" - which doesn't exist. How can this be fixed?

    opened by xyxz-web 24
  • Change Guava 14.0.1 to 13.0.1 for Intellij IDEA users

    Change Guava 14.0.1 to 13.0.1 for Intellij IDEA users

    New Android-archetype-generated Maven project with Transfuse cannot compile in Intellij IDEA. Android Maven project normally includes:

    <dependency>
                <groupId>com.google.android</groupId>
                <artifactId>android</artifactId>
                <version>4.1.1.4</version>
                <scope>provided</scope>
    </dependency>
    

    The above dependency depends on an older version of Guava that doesn't have FluentIterable.toSet() that is using by AnnotationProcessorBase.java:44 in transfuse support.

    java: java.lang.NoSuchMethodError: com.google.common.collect.FluentIterable.toSet()Lcom/google/common/collect/ImmutableSet;
    

    ~~Remarks: I don't know why but it seems the com.google.android:android depended on the Guava 11.0.2 using by Maven 3.~~

    The compilation does work when running with Maven in command line. So you can say it is a problem specific to Intellij IDEA's compiler. In Intellij IDEA project settings, if i move the platform dependency below the transfuse dependency, I can get pass the NoSuchMethodError. (but will get other problems)

    I would say it's not a fault of Transfuse at all to use the latest Guava. Instead, Intellij IDEA shouldn't include the old Guava in Maven when Android platform dependency is included. But it seems easier to make Transfuse to be compatible with Guava ~~11.0.2~~ 13.0.1 to allow Intellij uses to give it Transfuse a try. Notice that the new Android Studio by Google is Intellij IDEA and the same problem does exist. i.e. anyone who use Android Studio Maven project will get error when trying Transfuse.

    Would you accept my pull request if I patch Transfuse to drop Guava from 14 to ~~11~~ 13? or you think we should just hope Jetbrains fix the problem in IDEA?

    opened by mingfai 21
  • Multiple application elements when integrating Transfuse into legacy app

    Multiple application elements when integrating Transfuse into legacy app

    I am trying to convert from RoboGuice to Transfuse a little bit at a time. The problem I am hitting is that once I have a Transfuse activity in place I end up with two application blocks in my manifest... one with my legacy stuff and one with the Transfuse stuff.

    I am using gradle (1.9) and android-apt (1.2).

    opened by ghost 19
  • RegisterListener on a View without view id or tag results in NPE

    RegisterListener on a View without view id or tag results in NPE

    I rebased and am trying to update a bunch of stuff... Does this look like anything you've run into before?

    :rentals:compileProdstageDebugJava
    Exception in thread "pool-8-thread-1" java.lang.NullPointerException
        at com.sun.codemodel.JExpr.quotify(JExpr.java:239)
        at com.sun.codemodel.JStringLiteral.generate(JStringLiteral.java:61)
        at com.sun.codemodel.JFormatter.g(JFormatter.java:350)
        at com.sun.codemodel.JFormatter.g(JFormatter.java:363)
        at com.sun.codemodel.JInvocation.generate(JInvocation.java:185)
        at com.sun.codemodel.JFormatter.g(JFormatter.java:350)
        at com.sun.codemodel.JCast.generate(JCast.java:75)
        at com.sun.codemodel.JFormatter.g(JFormatter.java:350)
        at com.sun.codemodel.JAssignment.generate(JAssignment.java:65)
        at com.sun.codemodel.JFormatter.g(JFormatter.java:350)
        at com.sun.codemodel.JAssignment.state(JAssignment.java:69)
        at com.sun.codemodel.JFormatter.s(JFormatter.java:386)
        at com.sun.codemodel.JBlock.generateBody(JBlock.java:448)
        at com.sun.codemodel.JBlock.generate(JBlock.java:436)
        at com.sun.codemodel.JFormatter.g(JFormatter.java:350)
        at com.sun.codemodel.JBlock.state(JBlock.java:464)
        at com.sun.codemodel.JFormatter.s(JFormatter.java:386)
        at com.sun.codemodel.JMethod.declare(JMethod.java:460)
        at com.sun.codemodel.JFormatter.d(JFormatter.java:376)
        at com.sun.codemodel.JDefinedClass.declareBody(JDefinedClass.java:815)
        at com.sun.codemodel.JDefinedClass.declare(JDefinedClass.java:788)
        at com.sun.codemodel.JFormatter.d(JFormatter.java:376)
        at com.sun.codemodel.JFormatter.write(JFormatter.java:406)
        at com.sun.codemodel.JPackage.build(JPackage.java:438)
        at com.sun.codemodel.JCodeModel.build(JCodeModel.java:311)
        at org.androidtransfuse.transaction.CodeGenerationScopedTransactionWorker.innerRun(CodeGenerationScopedTransactionWorker.java:49)
        at org.androidtransfuse.transaction.AbstractCompletionTransactionWorker.run(AbstractCompletionTransactionWorker.java:35)
        at org.androidtransfuse.transaction.ScopedTransactionWorker.run(ScopedTransactionWorker.java:55)
        at org.androidtransfuse.transaction.Transaction.run(Transaction.java:77)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:744)
    Exception in thread "pool-10-thread-1" java.lang.NullPointerException
        at com.sun.codemodel.JExpr.quotify(JExpr.java:239)
        at com.sun.codemodel.JStringLiteral.generate(JStringLiteral.java:61)
        at com.sun.codemodel.JFormatter.g(JFormatter.java:350)
        at com.sun.codemodel.JFormatter.g(JFormatter.java:363)
        at com.sun.codemodel.JInvocation.generate(JInvocation.java:185)
        at com.sun.codemodel.JFormatter.g(JFormatter.java:350)
        at com.sun.codemodel.JCast.generate(JCast.java:75)
        at com.sun.codemodel.JFormatter.g(JFormatter.java:350)
        at com.sun.codemodel.JAssignment.generate(JAssignment.java:65)
        at com.sun.codemodel.JFormatter.g(JFormatter.java:350)
        at com.sun.codemodel.JAssignment.state(JAssignment.java:69)
        at com.sun.codemodel.JFormatter.s(JFormatter.java:386)
        at com.sun.codemodel.JBlock.generateBody(JBlock.java:448)
        at com.sun.codemodel.JBlock.generate(JBlock.java:436)
        at com.sun.codemodel.JFormatter.g(JFormatter.java:350)
        at com.sun.codemodel.JBlock.state(JBlock.java:464)
        at com.sun.codemodel.JFormatter.s(JFormatter.java:386)
        at com.sun.codemodel.JMethod.declare(JMethod.java:460)
        at com.sun.codemodel.JFormatter.d(JFormatter.java:376)
        at com.sun.codemodel.JDefinedClass.declareBody(JDefinedClass.java:815)
        at com.sun.codemodel.JDefinedClass.declare(JDefinedClass.java:788)
        at com.sun.codemodel.JFormatter.d(JFormatter.java:376)
        at com.sun.codemodel.JFormatter.write(JFormatter.java:406)
        at com.sun.codemodel.JPackage.build(JPackage.java:438)
        at com.sun.codemodel.JCodeModel.build(JCodeModel.java:311)
        at org.androidtransfuse.transaction.CodeGenerationScopedTransactionWorker.innerRun(CodeGenerationScopedTransactionWorker.java:49)
        at org.androidtransfuse.transaction.AbstractCompletionTransactionWorker.run(AbstractCompletionTransactionWorker.java:35)
        at org.androidtransfuse.transaction.ScopedTransactionWorker.run(ScopedTransactionWorker.java:55)
        at org.androidtransfuse.transaction.Transaction.run(Transaction.java:77)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:744)
    Note: Transfuse: AndroidManifest.xml file found: /Users/dan/dev/projects/z/android/rentals/src/main/AndroidManifest.xml
    Note: Transfuse: Transfuse took 4839ms to process
    Exception in thread "pool-21-thread-1" org.androidtransfuse.util.TransfuseRuntimeException: Unable to perform code generation
        at org.androidtransfuse.transaction.CodeGenerationScopedTransactionWorker.innerRun(CodeGenerationScopedTransactionWorker.java:53)
        at org.androidtransfuse.transaction.AbstractCompletionTransactionWorker.run(AbstractCompletionTransactionWorker.java:35)
        at org.androidtransfuse.transaction.ScopedTransactionWorker.run(ScopedTransactionWorker.java:55)
        at org.androidtransfuse.transaction.Transaction.run(Transaction.java:77)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:744)
    Caused by: javax.annotation.processing.FilerException: Attempt to recreate a file for type com.z.r.ui.MainControllerActivity
        at com.sun.tools.javac.processing.JavacFiler.checkNameAndExistence(JavacFiler.java:522)
        at com.sun.tools.javac.processing.JavacFiler.createSourceOrClassFile(JavacFiler.java:396)
        at com.sun.tools.javac.processing.JavacFiler.createSourceFile(JavacFiler.java:378)
        at org.androidtransfuse.config.SynchronizedFiler.createSourceFile(SynchronizedFiler.java:38)
        at org.androidtransfuse.gen.FilerSourceCodeWriter.openBinary(FilerSourceCodeWriter.java:48)
        at com.sun.codemodel.CodeWriter.openSource(CodeWriter.java:100)
        at com.sun.codemodel.JPackage.createJavaSourceFileWriter(JPackage.java:486)
        at com.sun.codemodel.JPackage.build(JPackage.java:437)
        at com.sun.codemodel.JCodeModel.build(JCodeModel.java:311)
        at org.androidtransfuse.transaction.CodeGenerationScopedTransactionWorker.innerRun(CodeGenerationScopedTransactionWorker.java:49)
        ... 6 more
    
    opened by dbachelder 18
  • Occasional analysis exceptions

    Occasional analysis exceptions

    I seem to "randomly" get these exceptions... they don't stop processing...and everything seems fine after.. but they're strange..

    Exception in thread "pool-6-thread-1" java.lang.NullPointerException
        at com.sun.tools.javac.model.JavacElements.cast(JavacElements.java:632)
        at com.sun.tools.javac.model.JavacElements.getPackageOf(JavacElements.java:367)
        at org.androidtransfuse.config.SynchronizedElements.getPackageOf(SynchronizedElements.java:67)
        at org.androidtransfuse.adapter.element.ASTElementFactory.buildPackageClass(ASTElementFactory.java:130)
        at org.androidtransfuse.adapter.element.ASTElementFactory.buildType(ASTElementFactory.java:87)
        at org.androidtransfuse.adapter.element.ASTElementFactory.getType(ASTElementFactory.java:78)
        at org.androidtransfuse.adapter.element.ASTElementFactory.findMethod(ASTElementFactory.java:249)
        at org.androidtransfuse.analysis.FragmentAnalysis.getASTMethod(FragmentAnalysis.java:187)
        at org.androidtransfuse.analysis.FragmentAnalysis.getASTMethod(FragmentAnalysis.java:183)
        at org.androidtransfuse.analysis.FragmentAnalysis.buildEventMethod(FragmentAnalysis.java:176)
        at org.androidtransfuse.analysis.FragmentAnalysis.setupFragmentProfile(FragmentAnalysis.java:160)
        at org.androidtransfuse.analysis.FragmentAnalysis.analyze(FragmentAnalysis.java:122)
        at org.androidtransfuse.analysis.FragmentAnalysis.analyze(FragmentAnalysis.java:47)
        at org.androidtransfuse.gen.AnalysisGeneration.innerRun(AnalysisGeneration.java:45)
        at org.androidtransfuse.gen.AnalysisGeneration.innerRun(AnalysisGeneration.java:29)
        at org.androidtransfuse.transaction.AbstractCompletionTransactionWorker.run(AbstractCompletionTransactionWorker.java:35)
        at org.androidtransfuse.transaction.CodeGenerationScopedTransactionWorker.innerRun(CodeGenerationScopedTransactionWorker.java:47)
        at org.androidtransfuse.transaction.AbstractCompletionTransactionWorker.run(AbstractCompletionTransactionWorker.java:35)
        at org.androidtransfuse.transaction.ScopedTransactionWorker.run(ScopedTransactionWorker.java:55)
        at org.androidtransfuse.transaction.Transaction.run(Transaction.java:77)
    
    opened by ghost 16
  • Activity/Fragment lifecycle calls to super not enforced

    Activity/Fragment lifecycle calls to super not enforced

    In the Android framework code, both Activity and Fragment enforce calls to super lifecycle methods. For example:

    class ExampleFragment extends Fragment {
    
       @Override
       public void onResume(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);// This call is enforced by the framework
          ...
       }
    }
    

    However, when using inheritance in Android Transfuse, super calls are not enforced in @Fragment and @Activity annotated classes. This can cause (difficult to discover) bugs when both a parent and child class implement @OnCreate (or @OnResume, @OnPause, etc).

    Is it possible for Transfuse to throw an error if this contract is not honored?

    opened by justincpollard 14
  • some generation problems after updating to latest support library

    some generation problems after updating to latest support library

    running into this after updating to latest 2.2.0 support library

    A DrawerLayout is being @Injected .. so transfuse is being a bit overly aggressive or something here.

    additionally the error does not specify an actual location for this error (I know where it is... just sayin')

    error: cannot access State
      class file for android.support.v4.widget.DrawerLayout$State not found
      Consult the following stack trace for details.
      com.sun.tools.javac.code.Symbol$CompletionFailure: class file for android.support.v4.widget.DrawerLayout$State not found
    
    opened by dbachelder 14
  • `Parcelable` not allowed as `@Extra`?

    `Parcelable` not allowed as `@Extra`?

    Hi John,

    Is Parcelable allowed as an @Extra annotated constructor parameter in a Transfuse activity? It appears that code generation won't complete when I do so. For example:

    /**
     * Created by justinpollard on 4/9/15.
     */
    @Activity
    @Layout(R.layout.a_gallery)
    @RegisterListener
    public class SomeActivity {
    
      private final Parcelable myParcelable;
    
      @Inject
      public SomeActivity(@Extra(value = "myParcelable", optional = true) Parcelable myParcelable) {
        this.myParcelable = myParcelable;
      }
    
    }
    

    This appears to throw the following exception:

    Exception in thread "pool-919-thread-1" org.androidtransfuse.TransfuseAnalysisException: Non-coercible types encountered
        at org.androidtransfuse.gen.invocationBuilder.TypeInvocationHelper.coerceType(TypeInvocationHelper.java:75)
        at org.androidtransfuse.gen.invocationBuilder.TypeInvocationHelper.getExpression(TypeInvocationHelper.java:49)
        at org.androidtransfuse.gen.ExpressionMatchingListFactory$1.apply(ExpressionMatchingListFactory.java:45)
        at org.androidtransfuse.gen.ExpressionMatchingListFactory$1.apply(ExpressionMatchingListFactory.java:43)
        at org.androidtransfuse.guava.collect.Iterators$8.transform(Iterators.java:794)
        at org.androidtransfuse.guava.collect.TransformedIterator.next(TransformedIterator.java:48)
        at org.androidtransfuse.guava.collect.ImmutableList.copyOf(ImmutableList.java:271)
        at org.androidtransfuse.guava.collect.ImmutableList.copyOf(ImmutableList.java:226)
        at org.androidtransfuse.guava.collect.FluentIterable.toList(FluentIterable.java:334)
        at org.androidtransfuse.gen.ExpressionMatchingListFactory.build(ExpressionMatchingListFactory.java:47)
        at org.androidtransfuse.gen.variableBuilder.VariableInjectionBuilder$1.write(VariableInjectionBuilder.java:109)
        at org.androidtransfuse.gen.variableBuilder.VariableInjectionBuilder$1.write(VariableInjectionBuilder.java:101)
        at org.androidtransfuse.gen.ExceptionWrapper.wrapException(ExceptionWrapper.java:45)
        at org.androidtransfuse.gen.variableBuilder.VariableInjectionBuilder.buildVariable(VariableInjectionBuilder.java:99)
        at org.androidtransfuse.gen.variableDecorator.VariableBuilderExpressionDecorator.buildVariableExpression(VariableBuilderExpressionDecorator.java:31)
        at org.androidtransfuse.gen.variableDecorator.VirtualProxyExpressionDecorator.buildVariableExpression(VirtualProxyExpressionDecorator.java:66)
        at org.androidtransfuse.gen.variableDecorator.ScopedExpressionDecorator.buildVariableExpression(ScopedExpressionDecorator.java:42)
        at org.androidtransfuse.gen.variableDecorator.CachedExpressionDecorator.buildVariableExpression(CachedExpressionDecorator.java:40)
        at org.androidtransfuse.gen.InjectionExpressionBuilder.buildVariable(InjectionExpressionBuilder.java:35)
        at org.androidtransfuse.gen.InjectionFragmentGenerator.buildFragment(InjectionFragmentGenerator.java:57)
        at org.androidtransfuse.experiment.generators.OnCreateInjectionGenerator$1.generate(OnCreateInjectionGenerator.java:85)
        at org.androidtransfuse.experiment.ComponentBuilder$MethodMetaData.build(ComponentBuilder.java:64)
        at org.androidtransfuse.experiment.ComponentBuilder.build(ComponentBuilder.java:120)
        at org.androidtransfuse.experiment.ComponentGenerator.build(ComponentGenerator.java:46)
    
    opened by justincpollard 14
  • Non-coercible type in undisclosed location.

    Non-coercible type in undisclosed location.

    But where?!

    Exception in thread "pool-8-thread-1" org.androidtransfuse.TransfuseAnalysisException: Non-coercible types encountered
        at org.androidtransfuse.gen.invocationBuilder.TypeInvocationHelper.coerceType(TypeInvocationHelper.java:75)
        at org.androidtransfuse.gen.invocationBuilder.TypeInvocationHelper.getExpression(TypeInvocationHelper.java:49)
        at org.androidtransfuse.gen.ExpressionMatchingListFactory$1.apply(ExpressionMatchingListFactory.java:45)
        at org.androidtransfuse.gen.ExpressionMatchingListFactory$1.apply(ExpressionMatchingListFactory.java:43)
    
    opened by dbachelder 14
  • onKeyDown Callthrough listener always consuming event

    onKeyDown Callthrough listener always consuming event

    For some reason, the following registered listener callthrough listeners seem to always consume the event, thus making it impossible to leave the application by pressing the back key:

        public boolean onKeyDown(int keyCode, android.view.KeyEvent event) {
            if (keyCode == KeyEvent.KEYCODE_BACK) {
                if (productListVisible == true) {
                    showRandomProductList();
                    return true;
                }
            }
            return false;
        }
    

    The generated code looks like this:

       @Override
        public boolean onKeyDown(int int$$1, KeyEvent keyEvent$$0) {
            return searchActivity$$0 .onKeyDown(int$$1, keyEvent$$0);
        }
    

    Any ideas on how it would be possible to make android consume the event itself and exiting the app when false is returned?

    opened by xyxz-web 14
  • class cast exception for a maven project

    class cast exception for a maven project

    hello,

    I have created a simple android maven application and when i try to execute it on mu emulator i get the below error. "04-22 09:12:15.819: E/AndroidRuntime(560): Caused by: java.lang.ClassCastException: com.xxx.transfuse.activity.AndroidWithTransfuseActivity 04-22 09:12:15.819: E/AndroidRuntime(560): at android.app.Instrumentation.newActivity(Instrumentation.java:1021) "

    Below is my manifest file and the main activity code.

    Manifest file

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.xxx.transfuse" android:versionCode="1" android:versionName="0.0.1-SNAPSHOT"  t:tag="+" xmlns:t="http://androidtransfuse.org">
    <uses-sdk
            android:minSdkVersion="8"
            android:targetSdkVersion="17" />
      <application android:name="android.app.Application" t:tag="+,n">
        <activity android:label="@string/app_name"   
            android:name=".activity.AndroidWithTransfuseActivity" t:tag="+,l,n">
          <intent-filter  t:tag="+">
            <action android:name="android.intent.action.MAIN" t:tag="+,n"/>
            <category android:name="android.intent.category.LAUNCHER" t:tag="+,n"/>
          </intent-filter>
        </activity>
      </application>
    </manifest>
    
    AndroidWithTransfuseActivity.java
    
    @Activity(label = "@string/app_name")
    @Layout(R.layout.main)
    @IntentFilter({
            @Intent(type = IntentType.ACTION, name = android.content.Intent.ACTION_MAIN),
            @Intent(type = IntentType.CATEGORY, name = android.content.Intent.CATEGORY_LAUNCHER) })
    public class AndroidWithTransfuseActivity {
    
        @Inject
        private LoginService loginService;
    
        @Inject
        @View(R.string.display_text)
        private TextView textView;
    
        @OnCreate
        public void transfusedemo(Bundle savedInstanceState) {
            String username = "user";
            String password = "user";
            String displayText = "";
            boolean loggedIn = loginService.login(username, password);
             if (loggedIn) {
                displayText = "Login Sucessful";
            } else {
                displayText = "Invalid Login";
            }
            textView.setText(displayText);
    
        }
    }
    
    opened by fxviking 13
  • Bump commons-io from 2.4 to 2.7 in /transfuse

    Bump commons-io from 2.4 to 2.7 in /transfuse

    Bumps commons-io from 2.4 to 2.7.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump commons-io from 2.4 to 2.7 in /transfuse-core

    Bump commons-io from 2.4 to 2.7 in /transfuse-core

    Bumps commons-io from 2.4 to 2.7.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump commons-io from 2.4 to 2.7 in /transfuse-support

    Bump commons-io from 2.4 to 2.7 in /transfuse-support

    Bumps commons-io from 2.4 to 2.7.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Using JavaFileObject.openOutputStream is very slow

    Using JavaFileObject.openOutputStream is very slow

    https://github.com/johncarl81/transfuse/blob/a8ee2e9b7263f4c88d93f0f85113a5e99b2a9011/transfuse-core/src/main/java/org/androidtransfuse/gen/FilerSourceCodeWriter.java#L53

    This method returns an output stream that writes each byte individually, which makes builds very slow. This Javac bug exists all the way up to JDK 15. The FilerOutputStream extends FilterOutputStream without overriding the write(byte[], offset, length) method. I've opened a JDK bug.

    In the meantime you can use JavaFileObject.openWriter instead, which does not have this performance problem. You can adapt it back to OutputStream using org.apache.commons.io.output.WriterOutputStream

    opened by oehme 0
  • Android API 28+ (OREO and Above)

    Android API 28+ (OREO and Above)

    Android began limiting the types of intent actions that can be invoked from a background service. Implicit Intent Actions (such as ACTION_POWER_CONNECTED) cannot be registered within the AndroidManifest.xml file.

    You must now manually register your implicit Intent Actions programmatically.

    i.e.

    context.resgisterReceiver(yourBroadcastReceiver, new IntentFilter("Implicit.Intent.Action));
    

    This would be great if Transfuse handled within its impl of BroadcastReceivers/IntentFilters.

    opened by jhilland 0
Koin - a pragmatic lightweight dependency injection framework for Kotlin

What is KOIN? - https://insert-koin.io A pragmatic lightweight dependency injection framework for Kotlin developers. Koin is a DSL, a light container

insert-koin.io 7.8k Jan 8, 2023
The dependency injection Dagger basics and the concepts are demonstrated in different branches

In this project we will look at the dependency injection Dagger basics and the concepts are demonstrated in different branches What is an Dependency?

Lloyd Dcosta 6 Dec 16, 2021
A scope tree based Dependency Injection (DI) library for Java / Kotlin / Android.

Toothpick (a.k.a T.P. like a teepee) Visit TP wiki ! What is Toothpick ? Toothpick is a scope tree based Dependency Injection (DI) library for Java. I

Stéphane Nicolas 1.1k Jan 1, 2023
Lightweight, minimalistic dependency injection library for Kotlin & Android

‼️ This project is in maintenance mode and not actively developed anymore. For more information read this statement. ‼️ Katana Katana is a lightweight

REWE Digital GmbH 179 Nov 27, 2022
Painless Kotlin Dependency Injection

KOtlin DEpendency INjection Kodein-DI is a very simple and yet very useful dependency retrieval container. it is very easy to use and configure. Kodei

null 2.9k Jan 1, 2023
A multi-purpose library containing view injection and threading for Android using annotations

SwissKnife A multi-purpose Groovy library containing view injection and threading for Android using annotations. It's based on both ButterKnife and An

Jorge Martin Espinosa 251 Nov 25, 2022
A SharedPreference "injection" library for Android

PreferenceBinder A SharedPreferences binding library for Android. Using annotation processing, this library makes it easy to load SharedPreferences va

Denley Bihari 232 Dec 30, 2022
A fast dependency injector for Android and Java.

Dagger A fast dependency injector for Java and Android. Dagger is a compile-time framework for dependency injection. It uses no reflection or runtime

Google 16.9k Jan 5, 2023
A fast dependency injector for Android and Java.

Dagger 1 A fast dependency injector for Android and Java. Deprecated – Please upgrade to Dagger 2 Square's Dagger 1.x is deprecated in favor of Google

Square 7.3k Jan 5, 2023
DependencyProperty is a dependency resolution library by Delegated Property.

DependencyProperty is a dependency resolution library by Delegated Property. Overview DependencyProperty is simple in defining and

wada811 10 Dec 31, 2022
Google Guice on Android, version 3.0 [RETIRED]

As of August 2016, RoboGuice is no longer supported. For nearly 5 years it was the #1 dependency injection framework on Android due to its ease-of-use

null 3.8k Dec 26, 2022
Bind Android views and callbacks to fields and methods.

Butter Knife Attention: This tool is now deprecated. Please switch to view binding. Existing versions will continue to work, obviously, but only criti

Jake Wharton 25.7k Jan 3, 2023
Bind Android views and callbacks to fields and methods.

Butter Knife Attention: This tool is now deprecated. Please switch to view binding. Existing versions will continue to work, obviously, but only criti

Jake Wharton 25.7k Mar 22, 2021
Easier creation of Dagger ObjectGraph scopes with Retrofit and Butterknife niceties

Scopes ###What is Scopes? Have you ever tried to set up scoped ObjectGraphs with Dagger and failed miserably? Scopes is a compile time annotation proc

null 35 Dec 30, 2019
Gradle plugin to add clock trackings to your dagger components and subcomponents

⏰ Dagger Track A gradle plugin that automatically adds clock tracking for your components and subcomponents. Features DaggerTrack will tell you follow

Amanjeet Singh 60 Aug 16, 2022
DI can be simple. Forget about modules and components. Just use it!

PopKorn - Kotlin Multiplatform DI PopKorn is a simple, powerful and lightweight Kotlin Multiplatform Dependency Injector. It doesn't need any modules

Pau Corbella 145 Dec 25, 2022
Simple Android Library, that provides easy way to start the Activities with arguments.

Warning: Library is not maintained anymore. If you want to take care of this library, propose it via Pull Request. It needs adjustmensts for newer ver

Marcin Moskała 429 Dec 15, 2022
Fast Android Development. Easy maintainance.

Fast Android Development. Easy maintenance. AndroidAnnotations is an Open Source framework that speeds up Android development. It takes care of the pl

null 11.1k Dec 31, 2022
Fast Android Development. Easy maintainance.

Fast Android Development. Easy maintenance. AndroidAnnotations is an Open Source framework that speeds up Android development. It takes care of the pl

null 11.1k Dec 31, 2022