petekanev / nativescript-android-utils Goto Github PK
View Code? Open in Web Editor NEWA collection of Android classes and utils
License: Other
A collection of Android classes and utils
License: Other
First of all, thanks for this, should save me tons of time.
But, it looks like I have an issue building while using your plugin. Sorry if it's something obvious but I'm new to {N} and also a Java noob.
So, my code is this:
com.pip3r4o.android.app.IntentService.extend("me.surdu.honkme.ActivityReconIntentService", {
onHandleIntent: function (intent) {
console.log("### GOT INTENT");
}
});
which generates the following Java code:
public class ActivityReconIntentService extends com.pip3r4o.android.app.IntentService implements com.tns.NativeScriptHashCodeProvider {
public ActivityReconIntentService(java.lang.String param_0){
super(param_0);
com.tns.Runtime.initInstance(this);
}
public ActivityReconIntentService(){
super();
com.tns.Runtime.initInstance(this);
}
public boolean equals__super(java.lang.Object other) {
return super.equals(other);
}
public int hashCode__super() {
return super.hashCode();
}
}
As you can see, it misses the onHandleIntent
which prompts the build to fail with:
error: ActivityReconIntentService is not abstract and does not override abstract method onHandleIntent(Intent) in IntentService
public class ActivityReconIntentService extends com.pip3r4o.android.app.IntentService implements com.tns.NativeScriptHashCodeProvider
I'm using {N} v3.0.
Hi Man how are you Im reaching at you cause Im using your code to get around the super constructor for th background services, I npm install the utils but my typedeft idex.d.ts is empty so I added manually I download a zip version from here and paste it into the node modules but i still get undefined, is there anything I'm missing ? can you help me thanks
com.pip3r4o.android.app.IntentService == undefined
The app runs fine on Android platform 5.2.0, but crashes after upgrading to 5.4.0:
System.err: java.lang.RuntimeException: Unable to start service com.radixdev.myproject.GeofenceTransitionsIntentService@8ecdab4 with Intent { cmp=com.radixdev.myproject/.GeofenceTransitionsIntentService (has extras) }: java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Message android.app.IntentService$ServiceHandler.obtainMessage()' on a null object reference
System.err: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3556)
System.err: at android.app.ActivityThread.-wrap20(Unknown Source:0)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1698)
System.err: at android.os.Handler.dispatchMessage(Handler.java:105)
System.err: at android.os.Looper.loop(Looper.java:164)
System.err: at android.app.ActivityThread.main(ActivityThread.java:6541)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
System.err: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Message android.app.IntentService$ServiceHandler.obtainMessage()' on a null object reference
System.err: at android.app.IntentService.onStart(IntentService.java:127)
System.err: at android.app.IntentService.onStartCommand(IntentService.java:141)
System.err: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3539)
System.err: ... 8 more
Hello,
i am using the package like this:
export class AlarmService extends com.pip3r4o.android.app.IntentService {
however, it does not detect the package, as seen in the title. I already tried to rebuild the platform and I also ran tns build android --androidTypings.
Plus I also tried add the node-module in the webpack.config.js like this
const appComponents = [
"tns-core-modules/ui/frame",
"tns-core-modules/ui/frame/activity",
"nativescript-android-utils"
];
I am running NS 6.1 and i need the plugin as extending the normal IntentService is not working.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.