-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
107 changed files
with
4,550 additions
and
904 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5.2.0 | ||
5.3.0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,38 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.snowplowanalytics.snowplowdemokotlin" > | ||
package="com.snowplowanalytics.snowplowdemokotlin"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> | ||
|
||
<!--Enable the permissions below for getting users geographical location.--> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- Enable the permissions below for getting users geographical location. --> | ||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | ||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||
|
||
<application | ||
android:usesCleartextTraffic="true" | ||
android:allowBackup="true" | ||
android:fullBackupContent="false" | ||
android:icon="@mipmap/ic_launcher_snowplow" | ||
android:label="@string/app_name" | ||
android:fullBackupContent="false" | ||
android:networkSecurityConfig="@xml/network_security_config" | ||
android:theme="@style/AppTheme" | ||
> | ||
android:usesCleartextTraffic="true"> | ||
<activity | ||
android:name=".MediaActivity" | ||
android:exported="false" | ||
android:label="@string/title_activity_media" /> | ||
<activity | ||
android:name=".MainActivity" | ||
android:screenOrientation="fullSensor" | ||
android:exported="true"> | ||
android:exported="true" | ||
android:screenOrientation="fullSensor"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name=".Demo" | ||
android:label="@string/title_activity_demo" | ||
android:screenOrientation="fullSensor"> | ||
</activity> | ||
android:screenOrientation="fullSensor"></activity> | ||
</application> | ||
|
||
</manifest> |
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
37 changes: 37 additions & 0 deletions
37
snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/MediaActivity.kt
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 @@ | ||
/* | ||
* Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. | ||
* | ||
* This program is licensed to you under the Apache License Version 2.0, | ||
* and you may not use this file except in compliance with the Apache License Version 2.0. | ||
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the Apache License Version 2.0 is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. | ||
*/ | ||
|
||
package com.snowplowanalytics.snowplowdemokotlin | ||
|
||
import android.app.Activity | ||
import android.net.Uri | ||
import android.os.Bundle | ||
import com.snowplowanalytics.snowplowdemokotlin.media.VideoViewController | ||
|
||
class MediaActivity : Activity() { | ||
private var videoViewController: VideoViewController? = null | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_media) | ||
|
||
val uri = Uri.parse("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4") | ||
videoViewController = VideoViewController(activity = this, uri = uri) | ||
} | ||
|
||
override fun onDestroy() { | ||
videoViewController?.destroy() | ||
videoViewController = null | ||
super.onDestroy() | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...low-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/media/VideoView.kt
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,49 @@ | ||
/* | ||
* Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. | ||
* | ||
* This program is licensed to you under the Apache License Version 2.0, | ||
* and you may not use this file except in compliance with the Apache License Version 2.0. | ||
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the Apache License Version 2.0 is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. | ||
*/ | ||
|
||
package com.snowplowanalytics.snowplowdemokotlin.media | ||
|
||
import android.content.Context | ||
import android.util.AttributeSet | ||
|
||
class VideoView : android.widget.VideoView { | ||
private var viewController: VideoViewController? = null | ||
|
||
constructor(context: Context?) : super(context) | ||
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) | ||
constructor(context: Context?, attrs: AttributeSet?, defStyle: Int) : super( | ||
context, | ||
attrs, | ||
defStyle | ||
) | ||
|
||
fun setVideoPlayer(player: VideoViewController?) { | ||
viewController = player | ||
} | ||
|
||
override fun start() { | ||
super.start() | ||
viewController?.onPlay() | ||
} | ||
|
||
override fun pause() { | ||
super.pause() | ||
viewController?.onPause() | ||
} | ||
|
||
override fun seekTo(msec: Int) { | ||
super.seekTo(msec) | ||
viewController?.onSeekStart() | ||
} | ||
} | ||
|
Oops, something went wrong.