Android Open Source - roboject Inject Service






From Project

Back to project page roboject.

License

The source code is released under:

Apache License

If you think the Android project roboject listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
//  w w w  .j a va2 s .  c o m
This file is part of Roboject

Copyright (c) 2010-2011 akquinet A.G.

Contact:  http://www.akquinet.de/en

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.
 */
package de.akquinet.android.roboject.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import android.app.Service;
import android.content.Intent;
import android.content.ServiceConnection;


/**
 * <p>
 * Connect to an Android service and inject its binder object to this field.
 * 
 * <p>
 * The annotated field must be of the type that the targeted service returns in
 * its {@link Service#onBind(android.content.Intent)} method.
 * {@link ServiceConnection#onServiceConnected(android.content.ComponentName, android.os.IBinder)}
 * 
 * @author Philipp Kumar
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface InjectService
{
    String intentAction() default Intent.ACTION_VIEW;

    Class<?> clazz() default Object.class;

    /**
     * If true, only services that are defined in the same app are injected (so
     * the service is part of the same Android package). If false, exposed
     * services from other apps can be injected. The default is false.
     */
    boolean packagePrivate() default true;

    int intentFlags() default 0;

    String intentType() default "";
}




Java Source Code List

de.akquinet.android.roboject.RobojectActivity.java
de.akquinet.android.roboject.RobojectException.java
de.akquinet.android.roboject.RobojectFragmentActivity.java
de.akquinet.android.roboject.RobojectFragment.java
de.akquinet.android.roboject.RobojectSupportFragment.java
de.akquinet.android.roboject.Roboject.java
de.akquinet.android.roboject.ServiceRegistry.java
de.akquinet.android.roboject.ServicesConnector.java
de.akquinet.android.roboject.annotations.InjectExtra.java
de.akquinet.android.roboject.annotations.InjectLayout.java
de.akquinet.android.roboject.annotations.InjectObject.java
de.akquinet.android.roboject.annotations.InjectResource.java
de.akquinet.android.roboject.annotations.InjectService.java
de.akquinet.android.roboject.annotations.InjectView.java
de.akquinet.android.roboject.injectors.ClassInjector.java
de.akquinet.android.roboject.injectors.ExtraInjector.java
de.akquinet.android.roboject.injectors.FieldInjector.java
de.akquinet.android.roboject.injectors.Injector.java
de.akquinet.android.roboject.injectors.LayoutInjector.java
de.akquinet.android.roboject.injectors.ResourceInjector.java
de.akquinet.android.roboject.injectors.ServiceInjector.java
de.akquinet.android.roboject.injectors.ViewInjector.java
de.akquinet.android.roboject.tutorial.activities.AdderActivity.java
de.akquinet.android.roboject.tutorial.activities.RobojectAdderActivity.java
de.akquinet.android.roboject.tutorial.services.TestService.java
de.akquinet.android.roboject.util.AndroidUtil.java
de.akquinet.android.roboject.util.IntentRegistry.java
de.akquinet.android.roboject.util.ReflectionUtil.java
de.akquinet.android.robojecttest.InjectLayoutTest.java
de.akquinet.android.robojecttest.InjectLocalServiceFragmentTest.java
de.akquinet.android.robojecttest.InjectLocalServiceSupportFragmentTest.java
de.akquinet.android.robojecttest.InjectLocalServiceViaClassTest.java
de.akquinet.android.robojecttest.InjectLocalServiceViaObjectTest.java
de.akquinet.android.robojecttest.InjectRemoteServiceFragmentTest.java
de.akquinet.android.robojecttest.InjectRemoteServiceSupportFragmentTest.java
de.akquinet.android.robojecttest.InjectRemoteServiceTest.java
de.akquinet.android.robojecttest.InjectResourceCustomTest.java
de.akquinet.android.robojecttest.InjectResourceFragmentTest.java
de.akquinet.android.robojecttest.InjectResourceSupportFragmentTest.java
de.akquinet.android.robojecttest.InjectResourceTest.java
de.akquinet.android.robojecttest.InjectServiceFragmentTest.java
de.akquinet.android.robojecttest.InjectServiceSupportFragmentTest.java
de.akquinet.android.robojecttest.InjectServiceTest.java
de.akquinet.android.robojecttest.InjectViewCustomTest.java
de.akquinet.android.robojecttest.InjectViewFragmentActivityTest.java
de.akquinet.android.robojecttest.InjectViewFragmentTest.java
de.akquinet.android.robojecttest.InjectViewSupportFragmentTest.java
de.akquinet.android.robojecttest.InjectViewTest.java
de.akquinet.android.robojecttest.activities.DummyFragmentActivity.java
de.akquinet.android.robojecttest.activities.DummySupportFragmentActivity.java
de.akquinet.android.robojecttest.activities.InjectLayoutTestActivity.java
de.akquinet.android.robojecttest.activities.InjectLocalServiceViaClassTestActivity.java
de.akquinet.android.robojecttest.activities.InjectLocalServiceViaObjectTestActivity.java
de.akquinet.android.robojecttest.activities.InjectRemoteServiceTestActivity.java
de.akquinet.android.robojecttest.activities.InjectResourceTestActivity.java
de.akquinet.android.robojecttest.activities.InjectServiceTestActivity.java
de.akquinet.android.robojecttest.activities.InjectViewTestActivity.java
de.akquinet.android.robojecttest.activities.InjectViewTestFragmentActivity.java
de.akquinet.android.robojecttest.fragments.InjectNonAndroidServiceTestFragment.java
de.akquinet.android.robojecttest.fragments.InjectNonAndroidServiceTestSupportFragment.java
de.akquinet.android.robojecttest.fragments.InjectRemoteServiceTestFragment.java
de.akquinet.android.robojecttest.fragments.InjectRemoteServiceTestSupportFragment.java
de.akquinet.android.robojecttest.fragments.InjectResourceTestFragment.java
de.akquinet.android.robojecttest.fragments.InjectResourceTestSupportFragment.java
de.akquinet.android.robojecttest.fragments.InjectServiceTestFragment.java
de.akquinet.android.robojecttest.fragments.InjectServiceTestSupportFragment.java
de.akquinet.android.robojecttest.fragments.InjectViewTestFragment.java
de.akquinet.android.robojecttest.fragments.InjectViewTestSupportFragment.java
de.akquinet.android.robojecttest.services.AdderFragmentImplementation.java
de.akquinet.android.robojecttest.services.AdderImplementation.java
de.akquinet.android.robojecttest.services.AdderInterface.java
de.akquinet.android.robojecttest.services.AdderSupportFragmentImplementation.java
de.akquinet.android.robojecttest.services.RemoteTestService.java
de.akquinet.android.robojecttest.services.TestService.java