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
// Background Location Priming Screen | |
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.R) { | |
int backgroundCheck = ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_BACKGROUND_LOCATION); | |
if (backgroundCheck != PackageManager.PERMISSION_GRANTED) { | |
requestPermissions(new String[]{Manifest.permission.ACCESS_BACKGROUND_LOCATION}, 1); | |
} | |
} |
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
// On Foreground Location Priming Screen | |
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.R) { | |
int foregroundCheck = ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION); | |
if (foregroundCheck != PackageManager.PERMISSION_GRANTED) { | |
requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1); | |
} | |
} |
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 Maybe<List<FeedItem>> getFeedItems() { | |
return Maybe | |
.concat(getFeedItemsNetwork(), getFeedItemsDB()) | |
.firstElement() | |
.subscribeOn(Schedulers.io()) | |
.observeOn(AndroidSchedulers.mainThread()); | |
} | |
public Maybe<List<FeedItem>> getFeedItemsNetwork() { | |
// Retrofit mFeedAPI that does the getFeedItems() network call |
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
#import <PULPulsate/PULPulsate.h> | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
PULAuthorizationData* authData = [[PULAuthorizationData alloc] initWithAppId:@"APP_ID" andAppKey:@"APP_KEY" validationError:nil]; | |
PULPulsateManager* manager = [PULPulsateFactory getInstanceWithAuthorizationData:authData withLocationEnabled:YES withPushEnabled:YES withLaunchOptions:launchOptions withPulsateAppDelegate:YES andPulsateNotificationDelegate:YES error:nil]; | |
[manager startPulsateSession:^(BOOL success, NSError * _Nullable error) { | |
}]; | |
} |
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
# Uncomment the next line to define a global platform for your project | |
# platform :ios, '9.0' | |
target 'PulsateImplementation' do | |
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks | |
# use_frameworks! | |
# Pods for PulsateImplementation | |
pod 'React', :path => '../node_modules/react-native' | |
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga' |
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
"dependencies": { | |
"react": "16.6.1", | |
"react-native": "0.57.5", | |
"react-native-pulsate-sdk-react": "^1.0.36" | |
}, | |
"devDependencies": { | |
"babel-jest": "23.6.0", | |
"jest": "23.6.0", | |
"metro-react-native-babel-preset": "0.49.1", | |
"react-test-renderer": "16.6.1" |
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
distributionBase=GRADLE_USER_HOME | |
distributionPath=wrapper/dists | |
zipStoreBase=GRADLE_USER_HOME | |
zipStorePath=wrapper/dists | |
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip |
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
android { | |
defaultConfig { | |
multiDexEnabled = true | |
ndk { | |
abiFilters "armeabi-v7a", "x86" | |
} | |
} | |
splits { | |
abi { | |
reset() |
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
buildscript { | |
ext { | |
buildToolsVersion = "27.0.3" | |
minSdkVersion = 16 | |
compileSdkVersion = 27 | |
targetSdkVersion = 27 | |
supportLibVersion = "27.1.1" | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:3.1.4' |
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
import android.content.Context; | |
import android.support.multidex.MultiDex; | |
import com.pulsatehq.external.pulsate.factory.PulsateFactory; | |
import com.pulsatehq.internal.Pulsate; | |
import com.pulsatehq.internal.util.AuthorizationData; | |
@Override | |
protected void attachBaseContext(Context base) { | |
super.attachBaseContext(base); | |
MultiDex.install(base); |
NewerOlder