Skip to content

Instantly share code, notes, and snippets.

View jaydeepw's full-sized avatar

JW jaydeepw

View GitHub Profile
// Step 1: Integrate the api_sdk as well in app/build.gradle
compile ('com.trustvision:tv_api_sdk:1.0.17@aar') {
transitive = true
}
// Step 2:
// If the image is in base64, convert it to byte array
// use something like below
// byte[] decodedString = Base64.decode(base64String, Base64.DEFAULT);
// Step 1: Integrate the api_sdk as well in app/build.gradle
compile ('com.trustvision:tv_api_sdk:1.0.17@aar') {
transitive = true
}
// Step 2:
// If the image is in base64, convert it to byte array
// use something like below
// byte[] decodedString = Base64.decode(base64String, Base64.DEFAULT);
@jaydeepw
jaydeepw / useBreakpoint.js
Created September 4, 2024 09:23
useBreakpoint.js using MUI v5.0
import { useTheme } from "@mui/material/styles"; // or @mui/joy/styles
import useMediaQuery from "@mui/material/useMediaQuery";
/**
* taken from https://material-ui.com/components/use-media-query/#migrating-from-withwidth
*
* Be careful using this hook. It only works because the number of
* breakpoints in theme is static. It will break once you change the number of
* breakpoints. See https://reactjs.org/docs/hooks-rules.html#only-call-hooks-at-the-top-level
*/