How We Can Use HTTPRequestHandler API : addStyelSheetTag in Outsystems Mobile App?

How We Can Use HTTPRequestHandler API : addStyelSheetTag in Outsystems Mobile App?

  

Hi Community,

I need to add some CSS/themes files at run time from some http/server  location. Is there any way to add the themes from server location to outsystems Mobile application to change the look and feel dynamically?

As initial research I fount HTTPRequestHandler is some help. But I dont know how to use this?

Please do let me know the real example or details explanation about this as in One project I need to implement this functioanlities?


Many Thanks

Dileep Verma

Hi Dileep,

I don´t know if this component could help you. But if you see its code could be any insight to do what you want. 

https://www.outsystems.com/forge/component/2253/silk-ui-mobile-customizer-preview/?Unfollow=False

Best Regards

Fabio Fantato

Fábio Fantato wrote:

Hi Dileep,

I don´t know if this component could help you. But if you see its code could be any insight to do what you want. 

https://www.outsystems.com/forge/component/2253/silk-ui-mobile-customizer-preview/?Unfollow=False

Best Regards

Fabio Fantato

Hi Fantato, I have gone through this also applied on real device. got themes changed at run time using theme customizer. but the problem is it is temporary . I dont want to check the themes and paste . I have a seprate CSS file for theme  somewhere on server and I just want to read that file and replace to Outsystems mobile themes CSS at run time.

Hope my question is clear to you?


Thanks

Dileep.


Hi Dileep,

HTTPRequestHandler is an Extension, and can therefore only be used in Web Apps, not in Mobile Apps. Mobile Apps are compiled to JavaScript, so anything you want to change must be done through JavaScript. If you Google for e.g. "dynamic loading css via javascript" (without the quotes) you'll find plenty of links (like this one) that explain how to do that.