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
package main.java.com.abccompany.example; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.nio.charset.StandardCharsets; | |
import java.security.*; | |
import java.security.spec.PKCS8EncodedKeySpec; | |
import java.util.Base64; | |
import java.util.regex.Pattern; |
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
-(void) openAppInstallRec:(OBRecommendation * _Nonnull)rec inNavController:(UINavigationController * _Nonnull)navController { | |
if (@available(iOS 11.3, *)) { | |
SKStoreProductViewController *storeViewController = [[SKStoreProductViewController alloc] init]; | |
NSDictionary *productParameters = [self prepareLoadProductParams:rec]; | |
NSLog(@"loadProductWithParameters: %@", productParameters); | |
[storeViewController loadProductWithParameters:productParameters completionBlock:^(BOOL result, NSError * _Nullable error) { | |
// result - true if the product information was successfully loaded, otherwise false. | |
NSLog(@"loadProductWithParameters - result: %@, error: %@", result ? @"true" : @"false", [error localizedDescription]); | |
}]; |
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
// | |
// ViewController.m | |
// AudioRecordTest | |
// | |
// Created by -------- on 16/01/2019. | |
// Copyright © 2019 -----. All rights reserved. | |
// | |
#import "ViewController.h" | |
#import <AVFoundation/AVFoundation.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
webView.setWebViewClient(new WebViewClient() { | |
@Override | |
public boolean shouldOverrideUrlLoading(WebView view, String url) { | |
if (url.contains("api_user_id")) { | |
return false; | |
} | |
url += (url.contains("?")) ? "&" : "?"; | |
url += "api_user_id="; | |
url += "<AD_ID_FROM_SOMEWHERE_ELSE>"; |
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
#pragma mark - WebView | |
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType | |
{ | |
NSString *url = request.URL.absoluteString; | |
NSString *advertiserId = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString]; | |
NSString *adIdParam = [NSString stringWithFormat:@"api_user_id=%@",advertiserId]; | |
NSRange extraParam = [url rangeOfString:adIdParam]; | |
if (extraParam.location == NSNotFound) { |