Skip to content

Commit cc5fd3d

Browse files
committed
fix conflicts
2 parents 553c366 + 1b31484 commit cc5fd3d

101 files changed

Lines changed: 20358 additions & 470 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Android/APIExample/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*.iml
22
.gradle
33
/local.properties
4+
/.idea
45
/.idea/caches
56
/.idea/libraries
67
/.idea/modules.xml
@@ -15,3 +16,5 @@ gradlew
1516
gradlew.bat
1617
.externalNativeBuild
1718
.cxx
19+
androidTest/
20+
Test/

Android/APIExample/app/.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea
5+
/.idea/caches
6+
/.idea/libraries
7+
/.idea/modules.xml
8+
/.idea/workspace.xml
9+
/.idea/navEditor.xml
10+
/.idea/assetWizardSettings.xml
11+
.DS_Store
112
/build
13+
/captures
14+
gradle
15+
gradlew
16+
gradlew.bat
17+
.externalNativeBuild
18+
.cxx
19+
androidTest/
20+
Test/

Android/APIExample/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ dependencies {
4444
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
4545
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
4646

47-
implementation 'io.agora.rtc:full-sdk:3.0.0'
48-
4947
implementation 'io.github.luizgrp.sectionedrecyclerviewadapter:sectionedrecyclerviewadapter:1.2.0'
5048
implementation 'com.yanzhenjie:permission:2.0.3'
49+
50+
implementation project(path: ':lib-stream-encrypt')
5151
}

Android/APIExample/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
<category android:name="android.intent.category.LAUNCHER" />
2626
</intent-filter>
2727
</activity>
28+
<service android:name=".examples.advanced.custom.AudioRecordService"
29+
android:exported="false"/>
2830
</application>
2931

3032
</manifest>

Android/APIExample/app/src/main/java/io/agora/api/example/MainActivity.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111

1212
import io.agora.api.example.annotation.Example;
1313

14-
public class MainActivity extends AppCompatActivity implements MainFragment.OnListFragmentInteractionListener {
14+
public class MainActivity extends AppCompatActivity implements MainFragment.OnListFragmentInteractionListener
15+
{
1516
private AppBarConfiguration appBarConfiguration;
1617

1718
@Override
18-
protected void onCreate(Bundle savedInstanceState) {
19+
protected void onCreate(Bundle savedInstanceState)
20+
{
1921
super.onCreate(savedInstanceState);
2022
setContentView(R.layout.activity_main);
2123

@@ -25,14 +27,16 @@ protected void onCreate(Bundle savedInstanceState) {
2527
}
2628

2729
@Override
28-
public boolean onSupportNavigateUp() {
30+
public boolean onSupportNavigateUp()
31+
{
2932
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
3033
return NavigationUI.navigateUp(navController, appBarConfiguration)
3134
|| super.onSupportNavigateUp();
3235
}
3336

3437
@Override
35-
public void onListFragmentInteraction(Example item) {
38+
public void onListFragmentInteraction(Example item)
39+
{
3640
Navigation.findNavController(this, R.id.nav_host_fragment).navigate(new ActionOnlyNavDirections(item.actionId()));
3741
}
3842
}
Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,47 @@
11
package io.agora.api.example.common;
22

33
import android.content.Context;
4+
import android.os.Bundle;
5+
import android.os.Handler;
6+
import android.os.Looper;
7+
import android.widget.Toast;
48

9+
import androidx.annotation.Nullable;
510
import androidx.appcompat.app.AlertDialog;
611
import androidx.fragment.app.Fragment;
712

8-
public class BaseFragment extends Fragment {
9-
protected void showAlert(String message) {
13+
public class BaseFragment extends Fragment
14+
{
15+
protected Handler handler;
16+
17+
@Override
18+
public void onCreate(@Nullable Bundle savedInstanceState)
19+
{
20+
super.onCreate(savedInstanceState);
21+
handler = new Handler(Looper.getMainLooper());
22+
}
23+
24+
protected void showAlert(String message)
25+
{
1026
Context context = getContext();
1127
if (context == null) return;
1228

1329
new AlertDialog.Builder(context).setTitle("Tips").setMessage(message)
1430
.setPositiveButton("OK", (dialog, which) -> dialog.dismiss())
1531
.show();
1632
}
33+
34+
protected final void showLongToast(final String msg)
35+
{
36+
handler.post(new Runnable()
37+
{
38+
@Override
39+
public void run()
40+
{
41+
if (BaseFragment.this == null || getContext() == null)
42+
{return;}
43+
Toast.makeText(getContext().getApplicationContext(), msg, Toast.LENGTH_LONG).show();
44+
}
45+
});
46+
}
1747
}

0 commit comments

Comments
 (0)