-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(performance): add missing methods (#505)
Implement new methods on android.
- Loading branch information
Showing
12 changed files
with
552 additions
and
3 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
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
38 changes: 38 additions & 0 deletions
38
...awesome/capacitorjs/plugins/firebase/performance/classes/options/GetAttributeOptions.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,38 @@ | ||
package io.capawesome.capacitorjs.plugins.firebase.performance.classes.options; | ||
|
||
import com.getcapacitor.PluginCall; | ||
import io.capawesome.capacitorjs.plugins.firebase.performance.FirebasePerformancePlugin; | ||
|
||
public class GetAttributeOptions { | ||
|
||
private final String traceName; | ||
private final String attribute; | ||
|
||
public static class GetAttributeOptionsException extends Exception { | ||
|
||
public GetAttributeOptionsException(String message) { | ||
super(message); | ||
} | ||
} | ||
|
||
public GetAttributeOptions(PluginCall call) throws GetAttributeOptionsException { | ||
String traceName = call.getString("traceName"); | ||
if (traceName == null) { | ||
throw new GetAttributeOptionsException(FirebasePerformancePlugin.ERROR_TRACE_NAME_MISSING); | ||
} | ||
this.traceName = traceName; | ||
String attribute = call.getString("attribute"); | ||
if (attribute == null) { | ||
throw new GetAttributeOptionsException(FirebasePerformancePlugin.ERROR_ATTRIBUTE_MISSING); | ||
} | ||
this.attribute = attribute; | ||
} | ||
|
||
public String getTraceName() { | ||
return traceName; | ||
} | ||
|
||
public String getAttribute() { | ||
return attribute; | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
...capawesome/capacitorjs/plugins/firebase/performance/classes/options/GetMetricOptions.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,38 @@ | ||
package io.capawesome.capacitorjs.plugins.firebase.performance.classes.options; | ||
|
||
import com.getcapacitor.PluginCall; | ||
import io.capawesome.capacitorjs.plugins.firebase.performance.FirebasePerformancePlugin; | ||
|
||
public class GetMetricOptions { | ||
|
||
private final String traceName; | ||
private final String metricName; | ||
|
||
public static class GetMetricOptionsException extends Exception { | ||
|
||
public GetMetricOptionsException(String message) { | ||
super(message); | ||
} | ||
} | ||
|
||
public GetMetricOptions(PluginCall call) throws GetMetricOptionsException { | ||
String traceName = call.getString("traceName"); | ||
if (traceName == null) { | ||
throw new GetMetricOptionsException(FirebasePerformancePlugin.ERROR_TRACE_NAME_MISSING); | ||
} | ||
this.traceName = traceName; | ||
String metricName = call.getString("metricName"); | ||
if (metricName == null) { | ||
throw new GetMetricOptionsException(FirebasePerformancePlugin.ERROR_METRIC_NAME_MISSING); | ||
} | ||
this.metricName = metricName; | ||
} | ||
|
||
public String getTraceName() { | ||
return traceName; | ||
} | ||
|
||
public String getMetricName() { | ||
return metricName; | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
...awesome/capacitorjs/plugins/firebase/performance/classes/options/PutAttributeOptions.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,48 @@ | ||
package io.capawesome.capacitorjs.plugins.firebase.performance.classes.options; | ||
|
||
import com.getcapacitor.PluginCall; | ||
import io.capawesome.capacitorjs.plugins.firebase.performance.FirebasePerformancePlugin; | ||
|
||
public class PutAttributeOptions { | ||
|
||
private final String traceName; | ||
private final String attribute; | ||
private final String value; | ||
|
||
public static class PutAttributeOptionsException extends Exception { | ||
|
||
public PutAttributeOptionsException(String message) { | ||
super(message); | ||
} | ||
} | ||
|
||
public PutAttributeOptions(PluginCall call) throws PutAttributeOptionsException { | ||
String traceName = call.getString("traceName"); | ||
if (traceName == null) { | ||
throw new PutAttributeOptionsException(FirebasePerformancePlugin.ERROR_TRACE_NAME_MISSING); | ||
} | ||
this.traceName = traceName; | ||
String attribute = call.getString("attribute"); | ||
if (attribute == null) { | ||
throw new PutAttributeOptionsException(FirebasePerformancePlugin.ERROR_ATTRIBUTE_MISSING); | ||
} | ||
this.attribute = attribute; | ||
String value = call.getString("value"); | ||
if (value == null) { | ||
throw new PutAttributeOptionsException(FirebasePerformancePlugin.ERROR_VALUE_MISSING); | ||
} | ||
this.value = value; | ||
} | ||
|
||
public String getTraceName() { | ||
return traceName; | ||
} | ||
|
||
public String getAttribute() { | ||
return attribute; | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
} |
Oops, something went wrong.