Extract html data after logging into website from android app - android

I recently started to learn to develop apps for android, but I'm stuck for quite a while on 1 problem:
I want to log from my app to a website (http://student.tu-sofia.bg/) and download some data from it, so I can use it later in my app. I have red different articles and tried different things but in the end nothing worked. The closest thing that I got as a result was receiving the source code of the login page( tried this Android: How to programatically login to website and retrieve data from it?)
Can someone tell my what I am doing wrong or give an advice how I should approach this ?

Related

Open local video on Android device, from a QR code

Background
Some teams in my company's facilities are using Android tablets for multiple operations. We would like to allow them to access video demos from their tablets, when they are at specific places in the facility, without having to search through the tablet for the right video. So we thought of QR codes (printed on paper, stuck to the wall). Problem is: for security reasons, we can't allow the devices to access any network.
Question
So the idea is to store the videos locally, and have the QR code route to the local file. I thought this would be easy but it doesn't appear to be.
I have generated QR codes like file:///path/to/my/file.mp4, also trying to play with intents, like this:
file:///path/to/my/file.mp4#Intent;scheme=file;action=android.intent.action.VIEW;type=video/mp4;end.
(+ variants including intent://, using scheme=file, targeting images instead of videos...)
In the best cases, the browser opens, closes, and I receive "Cannot display file. Invalid PDF", and in the worst cases, "Sorry, the application could not be launched. The bar code content may be invalid.".
I also tried variants (images instead of videos, URL vs plain text QR codes, several code scanner applications), all with the same result. I have searched through SO, but most questions are about doing this programmatically in an application, while I would like to avoid designing an app just for this.
What am I doing wrong? Is there no way to do this that way?
Note: I had absolutely no knowledge about Android and intents before trying to solve this case, there may be smarter workarounds. Any hint is appreciated.
Given the network requirement within your company, it seems building a simple application is the easiest solution(maybe because I am an app developer).
So your app would need only 2 screens. QR code Scanner and a View that shows the video.(once you click done, go back to scanning)
The app can have all the videos you need prebuilt in the app itself and the QR codes can be the names of those videos.
Okay, I don't know if you are using web page or any android app for this fature, for web page you need to create your own scanner or integrate ready made solution i found 1 here, you will need setTimeinterval so it scans bar code once, Once barcode is found you will need to call your ajax method to fetch complete URL of that video, once any item is returned, you need to display it in iframe.
Hope it works for you.

Where I can find web logs or something like that in Android Studio?

I have been developing app for android at Android Studio. At my project I'm using Retrofit and some others libraries. At one part of my app I have WebView which can load received url and show page content. I saw that smb at SO asked some questions which was connected with such web logcat. For example at ordinary logcat I can see all requests which are done by Retrofit library. It means I can check everything from headers to received data. But can I see sent and received data at webview? At Chrome for example I can see smth like logs at developer mode. I will need to add headers to my url which then will be loaded at webview and I will need to see it and also I'm interested in seeing data which I will receive.
UPDATE
I have found at profiler this tool but I can't select range for observing income data, maybe I have to reinstall AS? Here is example of networking profiler:
so how I can select range?
In general it looks like I managed to find web logs at AS. It is placed at profiler tool. Here you have to enter to network and then you will see all requests-responses. For diving at received-sent data you have to enable this:
then you will have to enter to profiler and select period:
I hope it will help someone else except me :)

Hash and compare changes in specific webpage in Android application

I´m working on a simple application which will create a notification if the content of specific website has been changed. Can anyone explain me how to do so? Thanks
P.S. Already took a look at How to ask
Here´s what I need to do exactly. I have Android app with few fragments in it, where one of them will show when the website content has been changed. And the problem is I don´t know how to do this: create java class which will hash the webpage (like kernel.org) every tho hours, compare it and if the first hash doesn´t match the new one, create notification.

Appcelerator WebView Offline Browsing

I am trying to achieve this in Appcelerator Alloy: I would like my users to be able to click a UI button to save a website currently shown in a WebView element for later recall. It should then work offline and include CSS and Images included in the HTML (and CSS) code. Is there any best practice to start off with here? I am targeting iOS and android with this app.
Thank you for your input!
jŒ
I will not post code here, but I can tell you what to do, as I coded the same thing a few days ago. But not with Alloy.
You have to download the html content via xhr get or post and save it into a file to the applicationDataDirectory. Then you can access to it completely whenever you want.

cannot open links sent in sms text messages

im sending links via sms
like so:
hello, please click on http://example.com/Axcsy
some of the users call back with a problem that they cannot connect,
after inspected i realized that the link has been cut after they pressed on it.
so when they press it they get to http://example.com,
when they copy paste the entire link it works ofc...
is this a known issue or some setting that they changed?
I don't know of any issue that can cause this.
All i can think of is that they didnt click on it and just copy pasted it.
Note: it happened with only a few users (maybe 5 out of thousands), it has nothing to do with model type or android/IOS version (as far as i know, i checked with users that have the same model...)
if anyone has any clue why this is happening please answer,
thanks to anyone who replys
The users are probably using a text messaging app that causes this problem. Many users do not realize that Android can have different text messaging apps - and therefore don't realize they can change them.
Some of your users may have deliberately changed it and can tell you what app they are using, and they could then tell you so you can contact the developer. Even a provider's default app may have been created wrong or has a bug.

Categories

Resources