This file contains hidden or 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 class PDFGenManager extends ReactContextBaseJavaModule { | |
private static final String TAG = "PDFGenManager"; | |
private ReactApplicationContext context; | |
private File directory; | |
private String dirPath; | |
private PDFConverter convertor; | |
public PDFGenManager(@NonNull ReactApplicationContext reactContext) { | |
super(reactContext); | |
this.context = reactContext; |
This file contains hidden or 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
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Color; | |
import android.util.Base64; | |
import androidx.annotation.NonNull; | |
import androidx.palette.graphics.Palette; | |
import com.bumptech.glide.Glide; |
This file contains hidden or 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 class CreateImage extends ReactContextBaseJavaModule { | |
private String finalPath = ""; | |
private ReactApplicationContext reactApplicationContext = null; | |
public CreateImage(ReactApplicationContext reactContext) { | |
super(reactContext); | |
this.reactApplicationContext = reactContext; | |
} |
This file contains hidden or 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
// | |
// CreateImage.h | |
// Created by Mohammad Julfikar on 28/06/2019. | |
// Copyright © 2019 Facebook. All rights reserved. | |
// | |
#import "RCTBridgeModule.h" | |
#import <Foundation/Foundation.h> | |
#import <UIKit/UIKit.h> |
This file contains hidden or 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
export const fetchParallel = (link,header, callback) =>{ | |
const POOR = 150; | |
const MODERATE = 550; | |
const GOOD = 2000; | |
const _start = new Date().getTime(); | |
const speedTester = RNFetchBlob | |
.config({ |
This file contains hidden or 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
export const isReachable = async () =>{ | |
const timeout = new Promise((resolve, reject) => { | |
setTimeout(reject, 5000, 'Request timed out'); | |
}); | |
const request = fetch('https://xxxxxx.com'); | |
try { | |
const response = await Promise | |
.race([timeout, request]); | |
return true; | |
} |
This file contains hidden or 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
// | |
// DownloadManager.h | |
// | |
// Created by Mohammad Julfikar on 22/05/2019. | |
// Copyright © 2019 Facebook. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import "RCTBridgeModule.h" |
This file contains hidden or 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
var xhttp = new XMLHttpRequest(); | |
xhttp.onreadystatechange = function() { | |
if (this.readyState == 4 && this.status == 200) { | |
console.log(JSON.stringify(this.responseText)); | |
} | |
}; | |
xhttp.open("GET", "LINK_TO_EASYTECH_API?auth=TOKEN", true); | |
xhttp.send(); |
This file contains hidden or 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
var xhttp = new XMLHttpRequest(); | |
xhttp.onreadystatechange = function() { | |
if (this.readyState == 4 && this.status == 200) { | |
console.log(JSON.stringify(this.responseText)); | |
} | |
}; | |
xhttp.open("GET", "LINK_TO_EASYTECH_API?date_from=2019-01-10&date_to=2019-02-22&auth=TOKEN", true); | |
xhttp.send(); |
NewerOlder