Java Code Examples for

The following are Jave code examples for showing how to use getReceiverInfo() of the class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: CSipSimple   File:   Source Code and License Vote up 6 votes
 * Build codec infos based on a component name of a manifest
 * It will retrieve {@link SipManager#META_LIB_NAME} and {@link SipManager#META_LIB_INIT_FACTORY} from the meta datas of the component
 * @param ctxt The current application context
 * @param cmp The component name of the remote plugin application
 * @throws NameNotFoundException If the remote component is not found
public DynCodecInfos(Context ctxt, ComponentName cmp) throws NameNotFoundException {
	PackageManager pm = ctxt.getPackageManager();
	ActivityInfo infos = pm.getReceiverInfo(cmp, PackageManager.GET_META_DATA);
	factoryInitFunction = infos.metaData.getString(SipManager.META_LIB_INIT_FACTORY);
          factoryDeinitFunction = infos.metaData.getString(SipManager.META_LIB_DEINIT_FACTORY);
	String libName = infos.metaData.getString(SipManager.META_LIB_NAME);
	PackageInfo pInfos = pm.getPackageInfo(cmp.getPackageName(), PackageManager.GET_SHARED_LIBRARY_FILES);
	// TODO : for now only api-9 compatible
	File libFile = NativeLibManager.getLibFileFromPackage(pInfos.applicationInfo, libName, true);
	if(libFile != null) {
		libraryPath = libFile.getAbsolutePath();