<RelativePanel>
<Rectangle x:Name="Blue" Height="100" Width="200" Fill="Blue"/>
<Rectangle x:Name="Red" Height="100" Width="100" Fill="Red"
RelativePanel.Below="Blue"
RelativePanel.RightOf="Blue"/>
</RelativePanel>
Here with the Source Code
<RelativePanel> <Rectangle x:Name="Blue" Height="100" Width="200" Fill="Blue"/> <Rectangle x:Name="Red" Height="100" Width="100" Fill="Red" RelativePanel.Below="Blue" RelativePanel.RightOf="Blue"/> </RelativePanel> <Pivot Title="Pivot Test Template">
<Pivot.HeaderTemplate> <DataTemplate> <TextBlock Text="{Binding}" FontSize="36" Foreground="Gray"/> </DataTemplate> </Pivot.HeaderTemplate> <PivotItem Header="Module 1"> <StackPanel> <TextBlock Text="Module Item 1" /> <TextBlock Text="Module Item 2" /> </StackPanel> </PivotItem> <PivotItem Header="Second"> <TextBlock Text="Fantastic" /> </PivotItem> <PivotItem Header="Third" Foreground="Blue"> <TextBlock Text="Awesome" /> </PivotItem> </Pivot> How to Connect to the Microsoft Band from android application using Java ?How to get the list of paired bands from the android application using java.
import com.microsoft.band.BandClient; import com.microsoft.band.BandClientManager; import com.microsoft.band.BandException; import com.microsoft.band.BandInfo; import com.microsoft.band.BandIOException; import com.microsoft.band.ConnectionState; public class BandManager { public BandInfo[] GetPairedBands() { return BandClientManager.getInstance().getPairedBands(); } public BandClient GetBandClientObject() { BandClient bandClient = BandClientManager.getInstance().create(getActivity(), pairedBands[0]); return bandClient; } public void Connect() { BandPendingResult<ConnectionState> result = bandClient.connect(); ConnectionState state = result.await(); if(state == ConnectionState.CONNECTED) { // Band is connected . Perform your logic after connection. } } } Below is the sample code snippet demonstrating how to get the list of paired Bands from your android application using java.
How to get the list of paired bands from the android application using java? import com.microsoft.band.BandClient; import com.microsoft.band.BandClientManager; import com.microsoft.band.BandException; import com.microsoft.band.BandInfo; import com.microsoft.band.BandIOException; import com.microsoft.band.ConnectionState; public class BandManager { public BandInfo[] GetPairedBands() { return BandClientManager.getInstance().getPairedBands(); } } When working with the Microsoft Band using Java for an android app , it is necessary add the following permissions under the uses-permission tag of the AndroidManifest.xml.
The AndroidManifest.xml will contain the similar code snippet as shown below. <uses-permission android:name="android.permission.BLUETOOTH"/> <uses-permission android:name="com.microsoft.band.service.access.BIND_BAND_SERVICE" /> |
Archives
June 2020
Categories
All
|