cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

AsRa_264661
Contributor

Hi All,

   

I had taken the CySmart example code, and started making my own application for BLE. I am getting some exception errors when adding this following

   

 application = (CySmartApplication) getActivity().getApplication();

   

 

   

in the profile scanning fragment.java file

   

 

   

Any idea on it?

   

error:

   

  Caused by: java.lang.ClassCastException: android.app.Application cannot be cast to com.fair.ashok.cypresssmart.CySmartApplication
    

   

Thanks,

   

Ashok r

0 Likes
1 Reply
Anonymous
Not applicable

Found this on the internet:

   

http://javarevisited.blogspot.in/2012/12/how-to-solve-javalangclasscastexception-java.html

   

Regards,

   

-Madhu Sudhan

0 Likes