@qusaieilouti99/call-manager 0.1.15 → 0.1.16

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.
@@ -29,11 +29,11 @@ class CallActivity : Activity() {
29
29
  // Optionally set avatarView image
30
30
 
31
31
  answerBtn.setOnClickListener {
32
- // Start MainActivity (React Native)
33
- val mainIntent = Intent(this, MainActivity::class.java)
34
- mainIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP)
35
- mainIntent.putExtra("incomingCall", true)
36
- startActivity(mainIntent)
32
+ // Start MainActivity (React Native) using launch intent
33
+ val launchIntent = packageManager.getLaunchIntentForPackage(packageName)
34
+ launchIntent?.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP)
35
+ launchIntent?.putExtra("incomingCall", true)
36
+ startActivity(launchIntent)
37
37
  finish()
38
38
  }
39
39
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qusaieilouti99/call-manager",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "call manager",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",