
If the device supports API level 16 (Android 4.1) then add a menu item on the repository management screen to "Find Local Repos". Activating this menu item will initiate NSD service discovery with the NsdHelper class looking for 'fdroidrepo' and 'fdroidrepos' service types on the local network. When one is found, the service is resolved and the name & IP are populated into a list of discovered repositories. Clicking an NSD discovered repo will prompt the user to add the repo.
27 lines
953 B
XML
27 lines
953 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent" >
|
|
|
|
<TextView
|
|
android:id="@+id/reposcanitemname"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:maxLines="1"
|
|
android:paddingLeft="8sp"
|
|
android:text="Discovered Repo Name"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold" />
|
|
|
|
<TextView
|
|
android:id="@+id/reposcanitemaddress"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_below="@+id/reposcanitemname"
|
|
android:layout_marginTop="2dp"
|
|
android:paddingLeft="8sp"
|
|
android:maxLines="1"
|
|
android:text="Repo Address"
|
|
android:textSize="14sp" />
|
|
|
|
</RelativeLayout> |