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
// ------------------------------------------------------------------------------------------ | |
// Usage of the custom hook | |
// ------------------------------------------------------------------------------------------ | |
import React from 'react' | |
import { Animated, View, TouchableOpacity, Text } from 'react-native' | |
import { useAnimation } from '/hooks' | |
function AwesomeComponent({ }) { |
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
package com.reactnative_kotlin_bridge.KotlinVideoStreaming | |
import com.facebook.react.ReactPackage | |
import com.facebook.react.bridge.NativeModule | |
import com.facebook.react.bridge.ReactApplicationContext | |
import com.facebook.react.uimanager.ViewManager | |
import java.util.* | |
class StreamPackage : ReactPackage { | |
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> { |
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
package com.reactnative_kotlin_bridge.KotlinVideoStreaming | |
import android.content.Intent | |
import com.facebook.react.bridge.ReactApplicationContext | |
import com.facebook.react.bridge.ReactContextBaseJavaModule | |
import com.facebook.react.bridge.ReactMethod | |
class StreamManager(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) { |
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
package com.reactnative_kotlin_bridge.KotlinVideoStreaming | |
import android.media.MediaPlayer | |
import android.net.Uri | |
import android.os.Build | |
import android.support.v7.app.AppCompatActivity | |
import android.os.Bundle | |
import android.view.View | |
import android.widget.MediaController | |
import com.reactnative_kotlin_bridge.R |
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:gravity="center_vertical" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
tools:context="com.reactnative_kotlin_bridge.KotlinVideoStreaming.VideoStreamingActivity"> | |
<FrameLayout |
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
public interface ApiEndpointInterface { | |
//Example of the implementation | |
@FormUrlEncoded | |
@POST("{token}/pay/cash?sandbox=1") | |
Call<ResponseBody> orderProducts(@Path("token") String token, | |
@QueryMap Map<String, String> map, | |
@Field("address") String addressId); | |
} |