Android packages apps bluetooth

How Android Bluetooth Profiles are enabled and Services are activated ?

Resource flag to indicate whether profile is supported or not.

private static final int[] PROFILE_SERVICES_FLAG = < R.bool.profile_supported_hs_hfp, R.bool.profile_supported_a2dp, R.bool.profile_supported_a2dp_sink, R.bool.profile_supported_hid, R.bool.profile_supported_hdp, R.bool.profile_supported_pan, R.bool.profile_supported_gatt, R.bool.profile_supported_map, R.bool.profile_supported_hfpclient, R.bool.profile_supported_avrcp_controller, >;

Supported Profile services are defined at,

private static final Class[] PROFILE_SERVICES = < HeadsetService.class, A2dpService.class, A2dpSinkService.class, HidService.class, HealthService.class, PanService.class, GattService.class, BluetoothMapService.class, HeadsetClientService.class, AvrcpControllerService.class, >;

Now inside init, it checks resources (from packages/apps/Bluetooth/res/values/config.xml ) flag and adds a profile if its supported as below,

boolean supported = resources.getBoolean(PROFILE_SERVICES_FLAG[i]); if (supported)

How Profile Services are started ? As mentioned above, the declaration of profile services, is done, now the profile service actually gets started from packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java

Class[] supportedProfileServices = Config.getSupportedProfiles(); [ This is called to Link ] mJniCallbacks.init(mBondStateMachine,mRemoteDevices);

[ This calls the JNI calls for the particular profile service ]

//Start profile services if (!mProfilesStarted && supportedProfileServices.length >0) < //Startup all profile services setProfileServiceState(supportedProfileServices,BluetoothAdapter.STATE_ON); >else

The above functions calls to starts the profile services, Call to setProfileServiceState goes to
file packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java

private void setProfileServiceState(Class[] services, int state) < for (int i=0; i debugLog("setProfileServiceState() - " + (state == BluetoothAdapter.STATE_OFF ? "Stopping" : "Starting") + " service " + serviceName); mProfileServicesState.put(serviceName,pendingState); Intent intent = new Intent(this,services[i]); intent.putExtra(EXTRA_ACTION,ACTION_SERVICE_STATE_CHANGED); intent.putExtra(BluetoothAdapter.EXTRA_STATE,state); startService(intent); > >

Источник

Android Open Source — Hardware bluetooth android_packages_apps_Bluetooth

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

Читайте также:  Defender freemotion b552 bluetooth

Project Detail

The following table is the detailed list of android_packages_apps_Bluetooth.

Item Value
Java File Count 89
Supported screen sizes [mdpi, hdpi, xhdpi]
Activity Count 9
Required Permissions android.permission.ACCESS_BLUETOOTH_SHARE
android.permission.ACCESS_NETWORK_STATE
android.permission.BLUETOOTH
android.permission.BLUETOOTH_ADMIN
android.permission.BLUETOOTH_STACK
android.permission.CALL_PRIVILEGED
android.permission.CHANGE_NETWORK_STATE
android.permission.CONNECTIVITY_INTERNAL
android.permission.INTERACT_ACROSS_USERS
android.permission.INTERACT_ACROSS_USERS_FULL
android.permission.INTERNET
android.permission.MANAGE_USERS
android.permission.MEDIA_CONTENT_CONTROL
android.permission.MMS_SEND_OUTBOX_MSG
android.permission.MODIFY_AUDIO_SETTINGS
android.permission.MODIFY_PHONE_STATE
android.permission.NET_ADMIN
android.permission.NET_TUNNELING
android.permission.READ_CALL_LOG
android.permission.READ_CONTACTS
android.permission.READ_PHONE_STATE
android.permission.READ_PROFILE
android.permission.READ_SMS
android.permission.RECEIVE_BOOT_COMPLETED
android.permission.RECEIVE_SMS
android.permission.SEND_SMS
android.permission.WAKE_LOCK
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.WRITE_SECURE_SETTINGS
android.permission.WRITE_SETTINGS
android.permission.WRITE_SMS
com.android.gallery3d.permission.GALLERY_PROVIDER
com.android.permission.HANDOVER_STATUS
com.google.android.gallery3d.permission.GALLERY_PROVIDER

Resource Files

There are 3 image files in android_packages_apps_Bluetooth. The names of the image files are listed as follows.

bt_incomming_file_notification.png bt_share.png ic_launcher_folder_bluetooth.png

The following screenshort is generated from the image listed above.

Hardware bluetooth android_packages_apps_Bluetooth

Java Source Files

android_packages_apps_Bluetooth has the following Java source files.

com.android.bluetooth.Utils.java com.android.bluetooth.a2dp.A2dpService.java com.android.bluetooth.btservice.AbstractionLayer.java com.android.bluetooth.btservice.AdapterApp.java com.android.bluetooth.btservice.AdapterService.java com.android.bluetooth.btservice.Config.java com.android.bluetooth.btservice.ProfileService.java com.android.bluetooth.gatt.GattService.java com.android.bluetooth.gatt.static.java com.android.bluetooth.gatt.static.java com.android.bluetooth.hdp.HealthService.java com.android.bluetooth.hfp.AtPhonebook.java com.android.bluetooth.hfp.BluetoothCmeError.java com.android.bluetooth.hfp.HeadsetHalConstants.java com.android.bluetooth.hfp.HeadsetService.java com.android.bluetooth.hid.HidService.java com.android.bluetooth.map.BluetoothMapAppParams.java com.android.bluetooth.map.BluetoothMapAuthenticator.java com.android.bluetooth.map.BluetoothMapContent.java com.android.bluetooth.map.BluetoothMapContentObserver.java com.android.bluetooth.map.BluetoothMapFolderElement.java com.android.bluetooth.map.BluetoothMapMessageListing.java com.android.bluetooth.map.BluetoothMapMessageListingElement .java com.android.bluetooth.map.BluetoothMapObexServer.java com.android.bluetooth.map.BluetoothMapRfcommTransport.java com.android.bluetooth.map.BluetoothMapService.java com.android.bluetooth.map.BluetoothMapSmsPdu.java com.android.bluetooth.map.BluetoothMapUtils.java com.android.bluetooth.map.BluetoothMapbMessage.java com.android.bluetooth.map.BluetoothMapbMessageMmsEmail.java com.android.bluetooth.map.BluetoothMapbMessageSms.java com.android.bluetooth.map.BluetoothMnsObexClient.java com.android.bluetooth.map.BluetoothMnsRfcommTransport.java com.android.bluetooth.opp.BluetoothOppBatch.java com.android.bluetooth.opp.BluetoothOppBtEnableActivity.java com.android.bluetooth.opp.BluetoothOppBtEnablingActivity.java com.android.bluetooth.opp.BluetoothOppBtErrorActivity.java com.android.bluetooth.opp.BluetoothOppHandoverReceiver.java com.android.bluetooth.opp.BluetoothOppIncomingFileConfirmActivity.java com.android.bluetooth.opp.BluetoothOppLauncherActivity.java com.android.bluetooth.opp.BluetoothOppLiveFolder.java com.android.bluetooth.opp.BluetoothOppManager.java com.android.bluetooth.opp.BluetoothOppObexClientSession.java com.android.bluetooth.opp.BluetoothOppObexServerSession.java com.android.bluetooth.opp.BluetoothOppObexSession.java com.android.bluetooth.opp.BluetoothOppPreference.java com.android.bluetooth.opp.BluetoothOppProvider.java com.android.bluetooth.opp.BluetoothOppReceiveFileInfo.java com.android.bluetooth.opp.BluetoothOppReceiver.java com.android.bluetooth.opp.BluetoothOppRfcommListener.java com.android.bluetooth.opp.BluetoothOppRfcommTransport.java com.android.bluetooth.opp.BluetoothOppSendFileInfo.java com.android.bluetooth.opp.BluetoothOppService.java com.android.bluetooth.opp.BluetoothOppShareInfo.java com.android.bluetooth.opp.BluetoothOppTransfer.java com.android.bluetooth.opp.BluetoothOppTransferActivity.java com.android.bluetooth.opp.BluetoothOppTransferAdapter.java com.android.bluetooth.opp.BluetoothOppTransferHistory.java com.android.bluetooth.opp.BluetoothOppTransferInfo.java com.android.bluetooth.opp.BluetoothOppUtility.java com.android.bluetooth.opp.BluetoothShare.java com.android.bluetooth.opp.Constants.java com.android.bluetooth.opp.NotificationManager.java com.android.bluetooth.opp.TestActivity.java com.android.bluetooth.pan.PanService.java com.android.bluetooth.pbap.BluetoothPbapActivity.java com.android.bluetooth.pbap.BluetoothPbapAuthenticator.java com.android.bluetooth.pbap.BluetoothPbapCallLogComposer.java com.android.bluetooth.pbap.BluetoothPbapConfig.java com.android.bluetooth.pbap.BluetoothPbapObexServer.java com.android.bluetooth.pbap.BluetoothPbapReceiver.java com.android.bluetooth.pbap.BluetoothPbapRfcommTransport.java com.android.bluetooth.pbap.BluetoothPbapService.java com.android.bluetooth.pbap.BluetoothPbapUtils.java com.android.bluetooth.pbap.BluetoothPbapVcardManager.java

java2s.com | © Demo Source and Support. All rights reserved.

Источник

Android Open Source — Hardware bluetooth android_packages_apps_Bluetooth

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

Project Detail

The following table is the detailed list of android_packages_apps_Bluetooth.

Item Value
Java File Count 61
Supported screen sizes [mdpi, hdpi]
Activity Count 10
Required Permissions android.permission.ACCESS_BLUETOOTH_SHARE
android.permission.BLUETOOTH
android.permission.BLUETOOTH_ADMIN
android.permission.BROADCAST_SMS
android.permission.INTERNET
android.permission.READ_CONTACTS
android.permission.READ_PHONE_STATE
android.permission.READ_SMS
android.permission.RECEIVE_BOOT_COMPLETED
android.permission.RECEIVE_SMS
android.permission.SEND_SMS
android.permission.WAKE_LOCK
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.WRITE_SETTINGS
android.permission.WRITE_SMS
com.android.email.permission.ACCESS_PROVIDER
com.android.email.permission.READ_ATTACHMENT
Читайте также:  Bluetooth module driver asus

Resource Files

There are 3 image files in android_packages_apps_Bluetooth. The names of the image files are listed as follows.

bt_incomming_file_notification.png bt_share.png ic_launcher_folder_bluetooth.png

The following screenshort is generated from the image listed above.

Hardware bluetooth android_packages_apps_Bluetooth

Java Source Files

android_packages_apps_Bluetooth has the following Java source files.

com.android.bluetooth.map.BluetoothMapAuthenticator.java com.android.bluetooth.map.BluetoothMapRfcommTransport.java com.android.bluetooth.map.BluetoothMasActivity.java com.android.bluetooth.map.BluetoothMasAppIf.java com.android.bluetooth.map.BluetoothMasAppParams.java com.android.bluetooth.map.BluetoothMasMsg.java com.android.bluetooth.map.BluetoothMasObexServer.java com.android.bluetooth.map.BluetoothMasReceiver.java com.android.bluetooth.map.BluetoothMasService.java com.android.bluetooth.map.BluetoothMasSpecParams.java com.android.bluetooth.map.BluetoothMasTestActivity.java com.android.bluetooth.map.BluetoothMns.java com.android.bluetooth.map.BluetoothMnsObexSession.java com.android.bluetooth.map.BluetoothMnsPreference.java com.android.bluetooth.map.BluetoothMnsRfcommTransport.java com.android.bluetooth.map.MapUtils.BmessageConsts.java com.android.bluetooth.map.MapUtils.CommonUtils.java com.android.bluetooth.map.MapUtils.EmailUtils.java com.android.bluetooth.map.MapUtils.MapUtils.java com.android.bluetooth.map.MapUtils.MapUtilsConsts.java com.android.bluetooth.map.MapUtils.MsgListingConsts.java com.android.bluetooth.map.MapUtils.SmsMmsUtils.java com.android.bluetooth.map.MapUtils.SortMsgListByDate.java com.android.bluetooth.opp.BluetoothOppBatch.java com.android.bluetooth.opp.BluetoothOppBtEnableActivity.java com.android.bluetooth.opp.BluetoothOppBtEnablingActivity.java com.android.bluetooth.opp.BluetoothOppBtErrorActivity.java com.android.bluetooth.opp.BluetoothOppIncomingFileConfirmActivity.java com.android.bluetooth.opp.BluetoothOppLauncherActivity.java com.android.bluetooth.opp.BluetoothOppLiveFolder.java com.android.bluetooth.opp.BluetoothOppManager.java com.android.bluetooth.opp.BluetoothOppObexClientSession.java com.android.bluetooth.opp.BluetoothOppObexServerSession.java com.android.bluetooth.opp.BluetoothOppObexSession.java com.android.bluetooth.opp.BluetoothOppPreference.java com.android.bluetooth.opp.BluetoothOppProvider.java com.android.bluetooth.opp.BluetoothOppReceiveFileInfo.java com.android.bluetooth.opp.BluetoothOppReceiver.java com.android.bluetooth.opp.BluetoothOppRfcommListener.java com.android.bluetooth.opp.BluetoothOppRfcommTransport.java com.android.bluetooth.opp.BluetoothOppSendFileInfo.java com.android.bluetooth.opp.BluetoothOppService.java com.android.bluetooth.opp.BluetoothOppShareInfo.java com.android.bluetooth.opp.BluetoothOppTransfer.java com.android.bluetooth.opp.BluetoothOppTransferActivity.java com.android.bluetooth.opp.BluetoothOppTransferAdapter.java com.android.bluetooth.opp.BluetoothOppTransferHistory.java com.android.bluetooth.opp.BluetoothOppTransferInfo.java com.android.bluetooth.opp.BluetoothOppUtility.java com.android.bluetooth.opp.BluetoothShare.java com.android.bluetooth.opp.Constants.java com.android.bluetooth.opp.NotificationManager.java com.android.bluetooth.opp.TestActivity.java com.android.bluetooth.pbap.BluetoothPbapActivity.java com.android.bluetooth.pbap.BluetoothPbapAuthenticator.java com.android.bluetooth.pbap.BluetoothPbapCallLogComposer.java com.android.bluetooth.pbap.BluetoothPbapObexServer.java com.android.bluetooth.pbap.BluetoothPbapReceiver.java com.android.bluetooth.pbap.BluetoothPbapRfcommTransport.java com.android.bluetooth.pbap.BluetoothPbapService.java com.android.bluetooth.pbap.BluetoothPbapVcardManager.java

java2s.com | © Demo Source and Support. All rights reserved.

Источник

Оцените статью
Adblock
detector