-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #184 from camarm-dev/dev
Version 1.2.3
- Loading branch information
Showing
10 changed files
with
142 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 9 additions & 1 deletion
10
app/android/app/src/main/java/com/camarm/remede/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
package com.camarm.remede; | ||
|
||
import android.os.Bundle; | ||
|
||
import com.getcapacitor.BridgeActivity; | ||
|
||
public class MainActivity extends BridgeActivity {} | ||
public class MainActivity extends BridgeActivity { | ||
@Override | ||
public void onCreate(Bundle savedInstanceState) { | ||
registerPlugin(SetResult.class); | ||
super.onCreate(savedInstanceState); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
app/android/app/src/main/java/com/camarm/remede/SetResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.camarm.remede; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
|
||
import com.getcapacitor.Plugin; | ||
import com.getcapacitor.PluginCall; | ||
import com.getcapacitor.PluginMethod; | ||
import com.getcapacitor.annotation.CapacitorPlugin; | ||
|
||
@CapacitorPlugin(name = "SetResult") | ||
public class SetResult extends Plugin { | ||
|
||
@PluginMethod() | ||
public void sendActiveRemedeResult(PluginCall call) { | ||
String value = call.getString("value"); | ||
|
||
Intent returnIntent = new Intent().putExtra("com.camarm.remede.ACTIVE_REMEDE_RESULT", value).putExtra(Intent.EXTRA_PROCESS_TEXT, value); | ||
getActivity().setResult(Activity.RESULT_OK, returnIntent); | ||
getActivity().finish(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { registerPlugin } from "@capacitor/core" | ||
|
||
export interface SetResultPlugin { | ||
sendActiveRemedeResult(options: { value: string }): Promise<void>; | ||
} | ||
|
||
const SetResult = registerPlugin<SetResultPlugin>("SetResult") | ||
|
||
export default SetResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters