kopia lustrzana https://github.com/ge0rg/aprsdroid
				
				
				
			bluetooth: reload list of BT devices
							rodzic
							
								
									1c7af2246c
								
							
						
					
					
						commit
						72441be560
					
				|  | @ -11,7 +11,10 @@ | |||
| 
 | ||||
| 		public BluetoothDevicePreference(Context context, AttributeSet attrs) { | ||||
| 			super(context, attrs); | ||||
| 		} | ||||
| 
 | ||||
| 		protected void onPrepareDialogBuilder(android.app.AlertDialog.Builder builder) { | ||||
| 			// hook into the builder to refresh the list
 | ||||
| 			BluetoothAdapter bta = BluetoothAdapter.getDefaultAdapter(); | ||||
| 			Set<BluetoothDevice> pairedDevices = bta.getBondedDevices(); | ||||
| 			CharSequence[] entries = new CharSequence[pairedDevices.size()]; | ||||
|  | @ -24,6 +27,8 @@ | |||
| 			} | ||||
| 			setEntries(entries); | ||||
| 			setEntryValues(entryValues); | ||||
| 
 | ||||
| 			super.onPrepareDialogBuilder(builder); | ||||
| 		} | ||||
| 
 | ||||
| 		public BluetoothDevicePreference(Context context) { | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Georg Lukas
						Georg Lukas