Skip to content

Commit 518df28

Browse files
committed
deep-linking fixed.
1 parent 7d30a06 commit 518df28

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

.idea/runConfigurations/github___home_screen.xml renamed to .idea/runConfigurations/github___home.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/src/main/AndroidManifest.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,27 @@
3434
<activity
3535
android:name=".activity.NavHostActivity"
3636
android:exported="true">
37+
38+
<!-- Intent-Filter -->
3739
<intent-filter>
3840
<category android:name="android.intent.category.LAUNCHER"/>
3941
<category android:name="android.intent.category.DEFAULT"/>
4042
<action android:name="android.intent.action.MAIN"/>
4143
<action android:name="android.intent.action.VIEW"/>
4244
</intent-filter>
45+
46+
<!-- Deep Links -->
47+
<intent-filter android:autoVerify="true" tools:targetApi="m">
48+
<action android:name="android.intent.action.VIEW"/>
49+
<category android:name="android.intent.category.DEFAULT"/>
50+
<category android:name="android.intent.category.BROWSABLE"/>
51+
<data android:scheme="github"/>
52+
</intent-filter>
53+
54+
<!-- Required for implicit deep-linking content. -->
55+
<nav-graph
56+
android:value="@navigation/nav_graph"/>
57+
4358
</activity>
4459

4560
<activity

mobile/src/main/java/io/syslogic/github/fragment/WorkflowFragment.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
6464
activity.setSupportActionBar(this.getDataBinding().toolbarWorkflow.toolbarWorkflow);
6565
this.mDataBinding.toolbarWorkflow.home.setOnClickListener(view -> activity.onBackPressed());
6666

67-
6867
if (! isNetworkAvailable(this.requireContext())) {
6968
this.onNetworkLost();
7069
} else {

mobile/src/main/res/navigation/nav_graph.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
android:name="io.syslogic.github.fragment.HomeScreenFragment"
1212
android:label="HomeScreenFragment"
1313
tools:layout="@layout/fragment_home_screen">
14-
<deepLink app:uri="github://home_screen"/>
14+
<deepLink app:uri="github://home"/>
1515
<action
1616
android:id="@+id/action_homeScreenFragment_to_repositoriesFragment"
1717
app:destination="@id/repositoriesFragment"/>

0 commit comments

Comments
 (0)