當前位置: 首頁>>代碼示例>>Java>>正文


Java ExtraPlugins.getDynActivityPlugins方法代碼示例

本文整理匯總了Java中com.csipsimple.utils.ExtraPlugins.getDynActivityPlugins方法的典型用法代碼示例。如果您正苦於以下問題:Java ExtraPlugins.getDynActivityPlugins方法的具體用法?Java ExtraPlugins.getDynActivityPlugins怎麽用?Java ExtraPlugins.getDynActivityPlugins使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.csipsimple.utils.ExtraPlugins的用法示例。


在下文中一共展示了ExtraPlugins.getDynActivityPlugins方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: buildCallUiIntent

import com.csipsimple.utils.ExtraPlugins; //導入方法依賴的package包/類
public static Intent buildCallUiIntent(Context ctxt, SipCallSession callInfo) {
    // Resolve the package to handle call.
    if(UI_CALL_PACKAGE == null) {
        UI_CALL_PACKAGE = ctxt.getPackageName();
        try {
            Map<String, DynActivityPlugin> callsUis = ExtraPlugins.getDynActivityPlugins(ctxt, SipManager.ACTION_SIP_CALL_UI);
            String preferredPackage  = SipConfigManager.getPreferenceStringValue(ctxt, SipConfigManager.CALL_UI_PACKAGE, UI_CALL_PACKAGE);
            String packageName = null;
            boolean foundPref = false;
            for(String activity : callsUis.keySet()) {
                packageName = activity.split("/")[0];
                if(preferredPackage.equalsIgnoreCase(packageName)) {
                    UI_CALL_PACKAGE = packageName;
                    foundPref = true;
                    break;
                }
            }
            if(!foundPref && !TextUtils.isEmpty(packageName)) {
                UI_CALL_PACKAGE = packageName;
            }
        }catch(Exception e) {
            Log.e(THIS_FILE, "Error while resolving package", e);
        }
    }
    SipCallSession toSendInfo = new SipCallSession(callInfo);
    Intent intent = new Intent(SipManager.ACTION_SIP_CALL_UI);
    intent.putExtra(SipManager.EXTRA_CALL_INFO, toSendInfo);
    intent.setPackage(UI_CALL_PACKAGE);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
    return intent;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:32,代碼來源:SipService.java

示例2: InCallCard

import com.csipsimple.utils.ExtraPlugins; //導入方法依賴的package包/類
public InCallCard(Context context, AttributeSet attrs) {
    super(context, attrs);
    LayoutInflater inflater = LayoutInflater.from(context);
    inflater.inflate(R.layout.in_call_card, this, true);

    prefs = new PreferencesProviderWrapper(context);
    canVideo = prefs.getPreferenceBooleanValue(SipConfigManager.USE_VIDEO);
    initControllerView();
    
    incallPlugins = ExtraPlugins.getDynActivityPlugins(context, SipManager.ACTION_INCALL_PLUGIN);
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:12,代碼來源:InCallCard.java


注:本文中的com.csipsimple.utils.ExtraPlugins.getDynActivityPlugins方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。