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 net.firepush.adnet; | |
import android.content.Context; | |
import android.util.Log; | |
import com.adobe.fre.FREContext; | |
import com.adobe.fre.FREFunction; | |
import com.adobe.fre.FREObject; | |
public class ShowBannerFunction implements FREFunction{ | |
@Override | |
public FREObject call(FREContext context, FREObject[] args) { |
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 net.firepush.adnet { | |
import flash.external.ExtensionContext; | |
public class FirePushExtension { | |
private static var context:ExtensionContext; | |
public static function init():void { | |
if(!context) context = ExtensionContext.createExtensionContext("net.firepush.adnet.FirePushLib", null); |
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 class Generator { | |
private static final Map<byte[], byte[]> cache = new HashMap<byte[], byte[]>(); | |
public static byte[] generate(byte[] src) { | |
byte[] generated = cache.get(src); | |
if (generated == null) { | |
synchronized (cache) { | |
generated = cache.get(src); | |
if (generated == null) { | |
generated = doGenerate(src); |
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
val myIntent = Intent(this, TimerReceiver::class.java) | |
val alarmManager = getSystemService(ALARM_SERVICE) as AlarmManager | |
val pendingIntent = PendingIntent.getService(this, 0, myIntent, PendingIntent.FLAG_UPDATE_CURRENT) | |
val calendar = Calendar.getInstance() | |
calendar.set(Calendar.HOUR_OF_DAY, 23) | |
calendar.set(Calendar.MINUTE, 29) | |
calendar.set(Calendar.SECOND, 0) | |
alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), 48 * 60 * 60 * 1000, pendingIntent) //set repeating every 24 hours |
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 { | |
repositories { | |
maven { url 'https://maven.fabric.io/public' } | |
} | |
dependencies { | |
classpath 'io.fabric.tools:gradle:1.24.3' | |
} | |
} | |
apply plugin: 'com.android.application' |
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 { | |
repositories { | |
maven { url 'https://maven.fabric.io/public' } | |
} | |
dependencies { | |
classpath 'io.fabric.tools:gradle:1.24.3' | |
} | |
} | |
apply plugin: 'com.android.application' |
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
10-18 16:30:36.502 4333-4333/com.nokl.androidclient E/AndroidRuntime: FATAL EXCEPTION: main | |
Process: com.nokl.androidclient, PID: 4333 | |
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.nokl.androidclient.credential.login.LPresenter.ok()' on a null object reference | |
at com.nokl.androidclient.credential.login.LoginFragment.onCreateView(LoginFragment.java:104) | |
at android.support.v4.app.Fragment.performCreateView(Fragment.java:2192) | |
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299) | |
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528) | |
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595) |
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 class FirstRunWizardFragment extends NoklFragment { | |
public static final String TAG = "com.nokl.androidclient.firstrunwizard"; | |
public static FirstRunWizardFragment newInstance() { | |
return new FirstRunWizardFragment(); | |
} | |
@Nullable | |
@Override | |
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { |
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
override fun onActivityCreated(savedInstanceState: Bundle?) { | |
super.onActivityCreated(savedInstanceState) | |
UiUtils.hideKeyboard(activity!!) | |
fab.setOnClickListener { | |
presenter.myLocationButtonClicked() | |
} | |
city_name.setOnClickListener { | |
presenter.citySearchClicked() | |
} | |
map_view.onCreate(savedInstanceState) |
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
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. | |
let searchController = UISearchController(searchResultsController: nil) | |
UITextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]).defaultTextAttributes = [NSAttributedStringKey.foregroundColor.rawValue: UIColor.white] | |
if let textfield = searchController.searchBar.value(forKey: "searchField") as? UITextField { | |
//let ss = sw?.subviews | |
if let backgroundview = textfield.subviews.first { |