Skip to content

Instantly share code, notes, and snippets.

View NewtronLabs's full-sized avatar

Newtron Labs NewtronLabs

View GitHub Profile
@NewtronLabs
NewtronLabs / support-us.md
Last active August 23, 2021 20:57
Support us

Support Us

Please support the continued development of these libraries. We host and develop these libraries for free. Any support is deeply appriciated. Thank you!

Support us

BTC Address: 39JmAfnNhaEPKz5wjQjQQj4jcv9BM11NQb

@NewtronLabs
NewtronLabs / IpcEventBus-conclusion.kt
Created June 28, 2020 22:09
IpcEventBus-conclusion.kt
class EventExample : EventIpcSimple {
private var mData: IData? = null
constructor(data: IData?) {
mData = data
}
internal constructor(`in`: Parcel) {
readFromParcel(`in`)
}
@NewtronLabs
NewtronLabs / IpcEventBus-conclusion.java
Created June 28, 2020 22:08
IpcEventBus-conclusion.java
public class EventExample extends EventIpcSimple {
private IData mData;
public EventExample(IData data) {
mData = data;
}
EventExample(Parcel in) {
readFromParcel(in);
}
@NewtronLabs
NewtronLabs / IpcEventBus-example2.java
Created June 28, 2020 21:54
IpcEventBus-example2
IpcEventBus.getInstance().postEvent(new MyEvent());
@NewtronLabs
NewtronLabs / IpcEventBus-example2.kt
Created June 28, 2020 21:54
IpcEventBus-example2
IpcEventBus.getInstance().postEvent(MyEvent())
@NewtronLabs
NewtronLabs / IpcEventBus-example1.java
Created June 28, 2020 21:53
IpcEventBus-example1
public class Listener implements IIpcEventBusConnectionListener, IIpcEventBusObserver {
public Listener() {
String targetApp = "com.packagename";
IIpcEventBusConnector connector =
ConnectorFactory.getInstance().buildConnector(context, this, targetApp);
connector.startConnection();
}
@NewtronLabs
NewtronLabs / IpcEventBus-example1.kt
Created June 28, 2020 21:41
IpcEventBus-example1
class Listener : IIpcEventBusConnectionListener, IIpcEventBusObserver {
init {
val targetApp = "com.packagename"
val connector = ConnectorFactory.getInstance().buildConnector(context, this, targetApp)
connector.startConnection()
}
override fun onConnected(connector: IIpcEventBusConnector) {
connector.registerObserver(this)
}
dependencies {
compileOnly 'com.newtronlabs.ipceventbus:ipceventbus:6.0.1'
}
@NewtronLabs
NewtronLabs / EasyPermissionsConclusion
Last active June 28, 2020 20:30
EasyPermissionsConclusion.kt
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
@NewtronLabs
NewtronLabs / Newtron Labs Library License.md
Last active March 11, 2023 01:12
Newtron Labs Library License

Newtron Labs Library License

This Newtron Labs library, binaries and source code can only be used in accordance with Freeware license. That is, freeware may be used without payment, but may not be modified. The developer of the library retains all rights to change, alter, adapt, and/or distribute the software. Newtron Labs is not liable for any damages and/or losses incurred during the use of one of its libraries.

You may not decompile, reverse engineer, pull apart, or otherwise attempt to dissect the source code, algorithm, technique or other information from the binary code of a Newtron Labs’ library unless it is authorized by existing applicable law and only to the extent authorized by such law. In the event that such a law applies, user may only attempt the foregoing if: (1) user has contacted Newtron Labs to request such information and Newtron Labs has failed to respond in a reasonable time, or (2) reverse engineering is strictly necessary to obtain such information and Newtron Labs has failed to repl