Non-Cookie Applaud App (Phonegap)

I have an application created for Android (and hopefully iPhone soon) using Phonegap AppLaud web interface.

It works almost perfectly, except that it does not seem to confirm the cookie data.

I saw this question that addresses almost the same problem, except that the answer is for the Eclipse Phone Plugin . Even if I understood the answer (which I’m not completely), I don’t see how to apply it in the AppLaud interface.

How to get the AppLaud app for storing and receiving cookies?

+4
source share
1 answer

I would try the methods described here: Android: how to save cookies? by adding them to the onCreate or init methods of the App.java PhoneGap project class.

You should have the app.java file in your PhoneGap project, perhaps with this content or similar:

public class App extends DroidGap { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.loadUrl("file:///android_asset/www/index.html"); } } 

Change this to check out the CodeSyncManager example:

 public class App extends DroidGap { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { CookieSyncManager.getInstance().sync(); super.onCreate(savedInstanceState); super.loadUrl("file:///android_asset/www/index.html"); } } 
+2
source

Source: https://habr.com/ru/post/1412463/


All Articles