Android Open Source - ble Cordova Interface

From Project

Back to project page ble.


The source code is released under:

Apache License

If you think the Android project ble 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

       Licensed to the Apache Software Foundation (ASF) under one
       or more contributor license agreements.  See the NOTICE file
       distributed with this work for additional information
       regarding copyright ownership.  The ASF licenses this file
       to you 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
//ww w  .  j  a  v  a 2 s .c om

       Unless required by applicable law or agreed to in writing,
       software distributed under the License is distributed on an
       KIND, either express or implied.  See the License for the
       specific language governing permissions and limitations
       under the License.
package org.apache.cordova;

import android.content.Intent;

import org.apache.cordova.CordovaPlugin;

import java.util.concurrent.ExecutorService;

 * The Activity interface that is implemented by CordovaActivity.
 * It is used to isolate plugin development, and remove dependency on entire Cordova library.
public interface CordovaInterface {

     * Launch an activity for which you would like a result when it finished. When this activity exits,
     * your onActivityResult() method will be called.
     * @param command     The command object
     * @param intent      The intent to start
     * @param requestCode   The request code that is passed to callback to identify the activity
    abstract public void startActivityForResult(CordovaPlugin command, Intent intent, int requestCode);

     * Set the plugin to be called when a sub-activity exits.
     * @param plugin      The plugin on which onActivityResult is to be called
    abstract public void setActivityResultCallback(CordovaPlugin plugin);

     * Get the Android activity.
     * @return the Activity
    public abstract Activity getActivity();

     * Called when a message is sent to plugin.
     * @param id            The message id
     * @param data          The message data
     * @return              Object or null
    public Object onMessage(String id, Object data);
     * Returns a shared thread pool that can be used for background tasks.
    public ExecutorService getThreadPool();

Java Source Code List