registerWithApp42(String) is undefined for the type Util

0 votes
Hi, I get error : The method registerWithApp42(String) is undefined for the type Util on line

Util.registerWithApp42("angular-axle-712");

whil trying to use the Push feature of shephertz .

 

so not able to compile and run ... any idea why ?
asked Nov 27, 2014 in App42 Cloud API-BaaS by jingahr (31 points)

1 Answer

+1 vote

Hi Jinhahr,

If you want to integrate Push Notification in Android , go through with sample and follow all the steps mentioned in it .

https://github.com/shephertz/App42-Android-Push-Sample

In Util.registerWithApp42("angular-axle-712") you should pass your Google Project No.

In case of further query, please revert back to us.

Thanks

Vishnu

answered Nov 28, 2014 by Vishnu Garg (674 points)
edited Nov 28, 2014 by Vishnu Garg
Hi Vishnu, I still have the same problem even after adding the project number

Util.registerWithApp42("36772734895");


it says : registerWithApp42 is undefined for the type util

the imports in my project are :
import com.shephertz.app42.paas.sdk.android.App42API;
import com.shephertz.app42.paas.sdk.android.App42CallBack;
import com.shephertz.app42.paas.sdk.android.push.PushNotification;
import com.shephertz.app42.paas.sdk.android.push.PushNotificationService;
import com.shephertz.app42.paas.sdk.android.util.Util;



pls check ...
Hey, Sample project itself contains Util class and there is a definition of "registerWithApp42" method. So you need to import right Util class in your project, import should be :

"com.example.app42sample.Util"

Thanks
Vishnu
I hope your query has been resolved, kindly let us know if you have more question for us.
Thanks,
Himanshu Sharma
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...