真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

JNI實(shí)現(xiàn)Broadcast-創(chuàng)新互聯(lián)

JNIEXPORT jint JNICALL Java_com_encrypt_EncryptActivity_cputExtra(JNIEnv *env,

10余年的湖口網(wǎng)站建設(shè)經(jīng)驗(yàn),針對(duì)設(shè)計(jì)、前端、開(kāi)發(fā)、售后、文案、推廣等六對(duì)一服務(wù),響應(yīng)快,48小時(shí)及時(shí)工作處理。成都全網(wǎng)營(yíng)銷的優(yōu)勢(shì)是能夠根據(jù)用戶設(shè)備顯示端的尺寸不同,自動(dòng)調(diào)整湖口建站的顯示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無(wú)論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設(shè)計(jì),從而大程度地提升瀏覽體驗(yàn)。創(chuàng)新互聯(lián)從事“湖口網(wǎng)站設(shè)計(jì)”,“湖口網(wǎng)站推廣”以來(lái),每個(gè)客戶項(xiàng)目都認(rèn)真落實(shí)執(zhí)行。

        jobject, jobject mContext, jstring actionName, jobjectArray key,

        jobjectArray value) {

    //找到Intent類

    jclass intentClass = env->FindClass("android/content/Intent");

    if (intentClass == 0) {

        return 0;

    }

    jobject intent;

    jmethodID intentId;

    intentId = env->GetMethodID(intentClass, "", "()V");

    if (intentId) {

        intent = env->NewObject(intentClass, intentId);

    } else {

        return 0;

    }

    jmethodID setActionId = env->GetMethodID(intentClass, "setAction",

            "(Ljava/lang/String;)Landroid/content/Intent;");

    if (setActionId == 0) {

        return 0;

    }

    env->CallObjectMethod(intent, setActionId, actionName);

    jmethodID putExtraId = env->GetMethodID(intentClass, "putExtra",

            "(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;");

    if (putExtraId == 0) {

        return 0;

    }

    int size = env->GetArrayLength(key);

    int i = 0;

    for (i = 0; i < size; i++) {

        jstring keys = (jstring) env->GetObjectArrayElement(key, i);

        jstring values = (jstring) env->GetObjectArrayElement(value, i);

        env->CallObjectMethod(intent, putExtraId, keys, values);

    }

    if (mContext == 0) {

        return 0;

    }

    jclass cls_context = env->FindClass("android/content/Context");

    if (cls_context == 0) {

        return 0;

    }

    jmethodID sendBroadcastId = env->GetMethodID(cls_context, "sendBroadcast",

            "(Landroid/content/Intent;)V");

    if (sendBroadcastId == 0) {

        return 0;

    }

    env->CallVoidMethod(mContext, sendBroadcastId, intent);

    return 1;

}

申明:

public native static int cputExtra(Context mContext,

      String action, String[] key, String[] value);

加載庫(kù):

  static {

    System.loadLibrary("****");

  }

調(diào)用:

 String[] a = {"a","b"};

 String[] c = {"c","d"};

 cputExtra(this,"android.provider.telephony.SMS_RECEIVED", a, c);

接收端:

public class sendBroadcasttest extends BroadcastReceiver {

  @Override

  public void onReceive(Context context, Intent intent) {

    // TODO Auto-generated method stub

    String str = intent.getAction();

    String name = intent.getStringExtra("b");

    Log.i("aaaaa", "FirstReceiver: " + name);

  }

}

  

    

      

        

        

      

    

需要添加權(quán)限

Broadcast使用可參考
http://192.210.60.138/dz/forum.php?mod=viewthread&tid=10&fromuid=1
(出處: IStudy)

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。


新聞標(biāo)題:JNI實(shí)現(xiàn)Broadcast-創(chuàng)新互聯(lián)
網(wǎng)頁(yè)路徑:http://weahome.cn/article/dsjdsc.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部