-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 4.0-migration-guide
- Loading branch information
Showing
21 changed files
with
572 additions
and
301 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Generate and publish documentation | ||
|
||
on: | ||
release: | ||
types: [ released ] | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
- name: Generate API documentation | ||
run: ./gradlew dokkaHtml | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: 'parsely/build/dokka/html' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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
58 changes: 58 additions & 0 deletions
58
example/src/main/java/com/example/InternalDebugOnlyData.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,58 @@ | ||
package com.example; | ||
|
||
import com.parsely.parselyandroid.ParselyTrackerInternal; | ||
|
||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.lang.reflect.InvocationTargetException; | ||
import java.lang.reflect.Method; | ||
|
||
/** | ||
* The InternalDebugOnlyData class is designed to provide access to internal data for debugging | ||
* purposes through reflection. The methods within this class are intended for internal use only | ||
* and should *not* be utilized within the SDK user's code. | ||
* @noinspection KotlinInternalInJava | ||
*/ | ||
class InternalDebugOnlyData { | ||
private final ParselyTrackerInternal parselyTracker; | ||
|
||
InternalDebugOnlyData(ParselyTrackerInternal parselyTracker) { | ||
this.parselyTracker = parselyTracker; | ||
} | ||
|
||
boolean engagementIsActive() { | ||
return (boolean) invokePrivateMethod("engagementIsActive"); | ||
} | ||
|
||
@Nullable | ||
Double getEngagementInterval() { | ||
return (Double) invokePrivateMethod("getEngagementInterval"); | ||
} | ||
|
||
@Nullable | ||
Double getVideoEngagementInterval() { | ||
return (Double) invokePrivateMethod("getVideoEngagementInterval"); | ||
} | ||
|
||
long getFlushInterval() { | ||
return (long) invokePrivateMethod("getFlushInterval"); | ||
} | ||
|
||
boolean videoIsActive() { | ||
return (boolean) invokePrivateMethod("videoIsActive"); | ||
} | ||
|
||
boolean flushTimerIsActive() { | ||
return (boolean) invokePrivateMethod("flushTimerIsActive"); | ||
} | ||
|
||
private Object invokePrivateMethod(String methodName) { | ||
try { | ||
Method method = ParselyTrackerInternal.class.getDeclaredMethod(methodName); | ||
method.setAccessible(true); | ||
return method.invoke(parselyTracker); | ||
} catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException e) { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
} |
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
Binary file not shown.
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,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.