@capgo/capacitor-stream-call 0.0.40 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -160,6 +160,48 @@ This is the only way we found to allow the app to use the same UI when phone is
|
|
|
160
160
|
This can be done that way only on Android on IOS this part is handle by the OS.
|
|
161
161
|
|
|
162
162
|
|
|
163
|
+
Also, for Android you need to change your main activity like so:
|
|
164
|
+
```java
|
|
165
|
+
@Override
|
|
166
|
+
protected void onCreate(Bundle savedInstanceState) {
|
|
167
|
+
// Ensure the activity is visible over the lock screen when launched via full-screen intent
|
|
168
|
+
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O_MR1) {
|
|
169
|
+
setShowWhenLocked(true);
|
|
170
|
+
setTurnScreenOn(true);
|
|
171
|
+
} else {
|
|
172
|
+
getWindow().addFlags(android.view.WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED | android.view.WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Furthermore, you need to edit your Application class like so:
|
|
178
|
+
```java
|
|
179
|
+
import ee.forgr.capacitor.streamcall.StreamCallPlugin;
|
|
180
|
+
|
|
181
|
+
@Override
|
|
182
|
+
public void onCreate() {
|
|
183
|
+
super.onCreate();
|
|
184
|
+
initializeApp();
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
private void initializeApp() {
|
|
188
|
+
Log.i(TAG, "Initializing application...");
|
|
189
|
+
// Initialize Firebase
|
|
190
|
+
com.google.firebase.FirebaseApp.initializeApp(this);
|
|
191
|
+
try {
|
|
192
|
+
StreamCallPlugin.preLoadInit(this, this);
|
|
193
|
+
Log.i(TAG, "StreamVideo Plugin preLoadInit invoked successfully");
|
|
194
|
+
} catch (Exception e) {
|
|
195
|
+
Log.e(TAG, "Failed to pre-initialize StreamVideo Plugin", e);
|
|
196
|
+
}
|
|
197
|
+
Log.i(TAG, "Application initialization completed");
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
> ⚠️ **WARNING**
|
|
202
|
+
>
|
|
203
|
+
> You may not have the Application class in your project, if so you need to create it.
|
|
204
|
+
|
|
163
205
|
## API
|
|
164
206
|
|
|
165
207
|
<docgen-index>
|
package/package.json
CHANGED