Loading JSON Feeds in Jquery Mobile and Phonegap app - json

I am new to jquery mobile and dont know much about working with its events and functions.
I am currently developing a phonegap app using jquery mobile.I went through many online tutorials to get started.In my jquery mobile app I have a RSS feed reader that loads my blog posts into the div showing a preloader first.
Now, I somewhere found a tutorial of loading JSON feeds instead of RSS.
But the problem with it is that it loads the posts without showing a mobile loader.I mean if i compile that app for android the user has to wait for a long without knowing whats going on.
I tried the Jquery mobile preloader like in my RSS app.But it still first calls the JSON script and then shows the preloader.
I want to make the JSON one work like the RSS reader which shows a script loader till the posts load.But when i try to do so the JSON feeds do not load. :(
Here is the demo of both the apps.
RSS:
http://silverjewelbox.in/rss
JSON:
http://silverjewelbox.in/mobile
If any one knows actually how to figure that out.I can also provide the code for the needed modifications.
Thank you,

You don't want to use Google for a JSONP server because Google caches the searches. Create your own JSONP RSS Feeds Server. See this article on CodeProject with full source code for creating RSS JSONP Feeds for PhoneGap Cordova Mobile Apps: http://www.codeproject.com/Articles/788762/PhoneGap-Cordova-JSONP-RSS-Feeds

Related

Embed latest youtube upload on webpage

I have tried finding documentation on how to do this but I just couldn't find any, all the ways I tried where all using or the old api or just displayed nothing, the ideal format that I wanted is using this generator: http://www.yvoschaap.com/youtube.html I got this working on the site but when I copied the code to my own site (running wordpress, I also tried it just in a blank file). Please help!
Instead of using that code, use the official Google's Youtube Data API to integration youtube lists into your website.
Link to Youtube Data API search lists: https://developers.google.com/youtube/v3/docs/search/list#http-request

Using Instagram API for simple web page

So I am working on a fairly simple project, basically a web page that should list the captions from a certain instagram account. It's all designed, it just needs to be lit up with the content. Have a look at http://evanshellborn.com/speechofthebeets/.
I found that you can see a json file containing all the necessary data at instagram.com/{username}/media. So in my case, https://www.instagram.com/beets_are_life/media/. So before I put that page actually online, I was on my local machine, and I did a JSON call to that page and it worked perfectly. So I built it all out and my web page loaded the captions just like I wanted it to.
Then I went to put it online, (http://evanshellborn.com/speechofthebeets), but it doesn't work. Have a look at the script at the bottom of it, on my localhost that code works and the captions get loaded. But on the live page, I get an access not allowed error in the console. So I think Instagram doesn't allow this sort of direct access anymore, you have to go through their API.
Now I've tried looking at the API but it seems rather confusing. Basically what I'm asking for is a different JSON url that would give me the same result as https://www.instagram.com/beets_are_life/media/, but that would work from the live page.
I think https://api.instagram.com/v1/users/{user-id}/?access_token=ACCESS-TOKEN would work, just replacing {user-id} with the appropraite user_id. But where do I get an access token?
From reading https://www.instagram.com/developer/authentication/, it looks like you get one when a user puts in their user credentials. But I don't want to have anyone log in, I just want a simple web page.
Hopefully that made sense. How can I do what I want?
Looks like the API url https://www.instagram.com/beets_are_life/media/ does not support jsonp (no callback support), so u cannot use javascript (client side) for making API request, it will fail because of Access-Control-Allow-Origin error on browser side, you have make this API call on server side as proxy.
I guess https://www.instagram.com/<USER_NAME>/media/ is not a publicly documented API, thats the reason it is not supporting jsonp, Instagram uses it for their website and since it is same-origin it will work for them on client-side
This link will help you embeding the instagram on a simple html webpage.
There is a button on the bottom of the post on instagram.when you click on the link a menu pops up. then click on embed
now a box pops up
just copy paste the html and you are done.
it will fetch the post for you

Creating an Ipad app with static html,css & javascript

Let me explain the scenario first.
I have a simple static dashboard html page with 5 simple charts created with HTML5, CSS
and javascript.
It renders data from a static Json to display the charts.
Its is not online and running in my local system.
There are no back end code which connects to a database.
Now I want to convert this to an Ipad app where I can see the dasboard page without out internet connection.
Kindly provide me a best way to do this.
Regards,
Shanmugam
You can use Apache Cordova (or phonegap) for building native web applications for all major platforms using HTML 5 , CSS and JavaScript.
You can refer to this Blog post on how to easily port existing HTML5 based application to iOS and Android.
Additionally you can also check this link for some more insights.

How do I get just the Facebook chat html into a web view?

Okay so I was wondering how the Gabtastik chat client (site-specific-browser-esque) manages to present only the chat part of Facebook, as seen here:
I'm making an app where I want to also include this functionality, but i really don't know how it is done, so i need a good kick in the right direction or some code or something.
It just loads http://www.facebook.com/presence/popout.php. I found that out by running strings on the Gabtastik executable, like this:
strings /Volumes/Gabtastik/Gabtastik.app/Contents/MacOS/Gabtastik
Unfortunately, that doesn’t exist anymore. When you launch Gabtastik now, you see this:
Facebook has XMPP access to chat that you can use… unfortunately, integrating it into an app takes much more work than showing a web page.

Can I start a webview out of view, scrape the html, and post forms through it?

I'm attempting to develop an application that scapes html of a site for relevant data and then display it back to the user in a more UI friendly way. I'm assuming that you can start a webView by
mWebView = (WebView) findViewById(R.id.webview);
but never setting the content to the actual view. So now my question is, can I take the html from the webview, scrape it, then somehow have the webview post back the forms, all while staying in the background? Any help is appreciated.
Or does anyone know of source such as htmlunit that will compile within android?
I have found out how to extract the HTML from the WebView using JavaScript thanks the guide on this site http://lexandera.com/category/webview_examples/ but I am still searching on how to return post forms to webView. Perhaps through javascript aswell?