How might I go about performing automated mobile search using python?
I have a program exploiting the Microsoft Rewards program, but currently I'm limited to desktop search. The bot performs random searches via bing for various accounts to gain points, later redeemed for voucher codes.
My intention is to do the same for mobile.
I appreciate this is quite a general question, but despite my best efforts, I can't find even a starting point.
This can be done via a desktop through a browser mobile device simulation.
Chrome browser: More tools -> developer tools -> toggle device toolbar.
This can also be done via hotkeys and hence suitable for automation. Now have the program perform searches using the same desktop search protocol; searches will be performed as if they're from a mobile device.
Others browsers have this capability.
Related
I have a medium size project on React+Nodejs and I need to choose best suitable technology for the mobile part. I am considering React Native or Web Progressive Apps for that. I want to ask you guys what is your experience so far about performance of "native-like" React Native versus WPA based apps.
I need to put into consideration:
1. Making it as easy as possible to make a transfer from ReactJS code into mobile.
2. Hardware support on mobile devices. Such as Barcode reading and NFC.
3. Push notifications.
4. Function well on both Android and iOS.
Biggest question is whether WPA technology has already become mature enough to trust it or not.
I had to make the same decision couple of months back and we chose PWA (not the answer for everyone yet).
Here is why we chose PWA,
1) Performance - Web can now perform 60fps - The magic number needs for native like smooth transitions.
2) Cost - Its fast and easy to build a product for both as a mobile app and web using PWA with no learning curve for existing web developers.
3) Proven - Starting from Twitter lite to Flipkart, there are so many success stories on PWA. No doubt its reliable. With iOS support coming couple of months back, now all major browsers support it.
PWA limitations and workarrounds,
1) Hardware - PWAs are limited to what web can do today. So there are hardwares like bar-code scanner we don't have any scope of support anytime soon and there are some hardware which very limited support and some hardware like Bluetooth with average support(in terms of % of browser versions supporting today) We had to build a small Android Native application to interact with these hardware and pass on the info to PWA suing web sockets. Say, when a barcode is scanned, this native Android service will listen for and receive it and pass on to our PWA. Same thing goes to NFC.
2) Packing and deploying - There is no official way to generate an APK and distribute in corporate environment. We were able to extract the APK after adding the PWA app to home screen using some file explorer and use that to distribute though. Havent tried on iOS. Hope for latest versions for any mobile OS, we can use cordova(not pure PWA but we get most of the benefits like Service Worker) to package and distribute as well.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
In 2015 Google introduced a new approach for developing web apps for Android: progressive web apps. One can create an application that will look like a native application, will be able to use device's hardware like camera and accelerometers, receive push notifications, have a launcher icon, work in offline, store local data, etc.
On Android, what features do native apps provide that progressive web apps do not support, and vice versa.
TL;DR - As of Feb 2017, Progressive Web Apps are a sufficiently powerful platform that Twitter has moved all of their mobile web traffic to a React PWA.
As of August 2016, Progressive Web Apps actually offer more hardware access than commonly thought. Here's a screenshot of whatwebcando.today from my Chrome 52 stable on Android:
Hardware access includes
geolocation - supported in the vast majority of browsers
camera and microphone via the getUserMedia/Stream and the upcoming MediaStream Image Capture APIs
device vibration
screen orientation and accelerometer access, including compass and gyroscope
battery status
Upcoming hardware access
These features are being implemented or already work in some browsers:
Bluetooth via Web Bluetooth API
NFC
ambient light sensor (works in Firefox 48+)
proximity sensor (works in Firefox 48+)
accelerometer, magnetometer and gyroscope sensor access
shape detection API
Another important point to note is that the Origin Trials Framework (implemented in Chrome) enables manufacturers to expose and test hardware (or software) capabilities without having to go through the standardization process. For example, a phone maker could expose an API for reading the values of a pressure sensor, refine it, then submit it for consideration to the W3C.
Besides hardware access, there are also software features traditionally employed by native apps that are now available to web apps.
Traditionally native features that PWAs can also use
push notifications
working offline
adding an icon to the home screen
appearing in the apps list thanks to WebAPKs - Progressive Web Apps can now be packaged into actual installable Android packages!
launching in full-screen
clipboard access
hardware-accelerated 2D/3D graphics via HTML5 Canvas or WebGL - check some of the HTML5 Canvas demos, WebGL sites or the three.js library. A 2014 benchmark of the Unity cross-platform game engine compared native vs. WebGL rendering performance, and concluded that
"The most important takeaway is, while there are still areas where WebGL is significantly slower than native code, overall you can get expect very decent performance already, and this can only get better in the future."
The gap has indeed been closing.
reading user-selected files in any browser
slick, smooth UIs with 60fps animations
These features cover a lot of use cases, and many popular native apps nowadays could be rewritten as PWAs. Take Slack, for example. Its open source alternative, Rocket.Chat, is building a PWA version. For more PWA demos, see https://pwa.rocks.
Native-like features coming to PWAs
handling intents — for example, sharing a page to another app, or being the share target, e.g. a PWA chat app that receives an image to set as the user’s avatar
Native Android features not yet available to PWAs
access to the fingerprint sensor (under development)
contacts, calendar and browser bookmarks access (lack of access to these could be viewed as a feature by privacy-conscious users)
alarms
telephony features - intercept SMSes or calls, send SMS/MMS, get the user's phone number, read voice mail, make phone calls without the Dialer dialog
low-level access to some hardware features and sensors: flashlight, atmospheric pressure sensor
system access: task management, modifying system settings, logs
Progressive Web Apps offer features that native apps lack
discoverability - content in progressive web apps can easily be found by search engines but a content-centric native app like StackOverflow won't show among app store search results for content that it does offer access to, such as "pwa vs. native". This is a problem for communities like Reddit, which can't expose their numerous sub-communities to the app store as individual "apps".
linkability - any page/screen can have a direct link, which can be shared easily
bookmarkability - save that link to access an app's view directly
always fresh - no need to go through the app stores to push updates
universal access - not subject by app stores sometimes arbitrary policies or (unintended) geographic restrictions
large data savings, extremely important in emerging markets with expensive and/or slow Internet access. For example, e-commerce website Konga cut data usage by 92% for the first load by migrating to a PWA.
low friction of distribution - if your progressive web app is online, it's already accessible for Android (and other mobile) users.
65.5% of US smartphone users don't download any new apps each month
PWAs eliminate the need to go to the app store, search for the app, click Install, wait for the download, then open the app. Each of these steps loses 20% of the potential users.
Final note: PWAs run, with the same codebase, on the desktop as well as most mobile devices. On desktop environments (ChromeOS, and later Mac and Windows), they're launched in the same way as other apps, and run in a regular app window (no browser tab).
The main advantage for native applications is that they can access all native APIs a platform could offer (contacts, camera flash, SMS, telephony, network, bluetooth, sensors, raw sockets...) while a progressive web application can not (yet) as they are constrained by the Standard Web capabilities.
The goal for progressive web applications is to expand these capabilities to cover the most critical cases. In this mood, take a look at Progressive Web Apps: Escaping Tabs Without Loosing Our Soul where you can find a list of what a progressive web application should offer:
Responsive: to fit any form factor
Connectivity independent: Progressively-enhanced with Service Workers to let them work offline
App-like-interactions: Adopt a Shell + Content application model to create appy navigations & interactions
Fresh: Transparently always up-to-date thanks to the Service Worker update process
Safe: Served via TLS (a Service Worker requirement) to prevent snooping
Discoverable: Are identifiable as “applications” thanks to W3C Manifests and Service Worker registration scope allowing search engines to find them
Re-engageable: Can access the re-engagement UIs of the OS; e.g. Push Notifications
Installable: to the home screen through browser-provided prompts, allowing users to “keep” apps they find most useful without the hassle of an app store
Linkable: meaning they’re zero-friction, zero-install, and easy to share. The social power of URLs matters.
From these points, linkable was one of the first characteristics imported by native applications from the Open Web in the form of mobile deep linking.
But special mention deserve the combo fresh + installable as it represents one of the main advantages of the Web as a platform over the native alternatives. Here installable means that it appears in your home screen. It does not mean you require to pass downloading and installation stages. You open a URL or discover a service while browsing and it's done: it appears in your home screen.
Fresh refers to how a regular web works, offering an instant load and seamless updates. You are not asked for installing an update from the web of YouTube, it is deployed and you consumes it the next time you visit it.
I'm not talking about the benefits of the remaining points because you were asking for the differences and, for instance, re-engagement is something native applications already have via push services and notifications and now web applications have caught up.
Other related and key question is about which platform is more suitable for your needs. If you are not accessing special hardware capabilities, the Web should be enough and choosing the web you are free from the marketplaces, proprietary ecosystems and by the way, you can ensure certain grade of ubiquity and interoperability.
As final notes, I recommend you to browse www.flipkart.com from a mobile with Chrome. It's pretty awesome: no bugs, smooth navigation, app-like feeling. Go offline and it will continue working. A truly real world example of that post. Add the app to home screen and next time you open it, the experience is even better.
You can take a look at Firefox OS as well as an example of bringing more platform APIs to the Standard Web (with more or less success).
What constitutes a "mobile device" for the Google Mobile Friendly tool's purposes? How does it present itself to the page it is testing? Since it is an automated tool, it doesn't have a screen resolution to check for. So, when the tool arrives at my site to test it, what do I check for to determine that it is a mobile device hitting the page, so I know to present it the mobile friendly content?
I figured this out myself by just running the tool and then looking at my IIS logfiles.
2016-01-31 15:37:23 23.254.211.242 GET /sliders/2.jpg - 80 - 66.249.64.198 Mozilla/5.0+(iPhone;+CPU+iPhone+OS+8_3+like+Mac+OS+X)+AppleWebKit/600.1.4+(KHTML,+like+Gecko)+Version/8.0+Mobile/12F70+Safari/600.1.4+(compatible;+Googlebot/2.1;++http://www.google.com/bot.html)
It appears that the Mobile Friendly Tool presents itself as an iPhone, running Safari.
Here is my scenario,
I am looking at solutions like Good for Government, which allows a government agency to restrict access to system applications in iOS and Android via a web server/enterprise solution. This is what they describe their solution does:
Helpdesk personnel can quickly troubleshoot issues, with complete
visibility into all iOS devices deployed within the agency. To
protect agency data, you can enforce policies, such as requiring
passwords and preventing cut/copy/paste from the Good app. You can
also block unapproved applications such as YouTube, the Safari
browser, camera, or the App Store. In the event the device is lost
or stolen, you can remote-wipe agency data. Self-service
capabilities allow you to empower employees with basic tasks, such as
adding devices or remote wiping their own devices.
Is this at all possible to recreate? Of course for a different purpose, but if I could restrict access to certain system applications with a set code, and only to be unblocked again by a qualified person within a data center?
If someone could point me in the right direction to be able to do such things with iOS, and Android if possible as well, it would be more than appreciated.
Some of these things are possible using Device Administration introduced in Android 2.2
http://developer.android.com/guide/topics/admin/device-admin.html#policies
e.g
Remote Wipe
, Disable Camera
iOS has some of these features like Device Administration, Remote Wipe, Ability to control which apps can be disabled..
http://images.apple.com/iphone/business/docs/iOS_Security.pdf
We have an existing web site, and I've been asked to test its compatibility with mobile browsers.
I've installed the Android SDK onto my desktop PC. I'm able to view my localhost site in the emulator, and I have identified a number of glitches in the page layout which occur in the Android browser.
But since none of these issues occur in any desktop browser, I've been struggling with how to debug them. For example, in Firefox, it's very easy to use Firebug to see what stylesheets have been appies and to adjust them on the fly to see how it affects the layout. But I haven't found a way to do anything similar on the Android emulator.
The question is, short of trial+error, how do I go about working out what is causing those layout issues? Does the Android browser (or the Android SDK) have any kind of tools that are useful for debugging CSS? If so, how do I use them?
[EDIT] I haven't found a solution to this, so I'm throwing open the doors to the bounty hunters...
Weinre is probably the closest to what you're looking for:
If what you're looking for is something that allows you to tweak layout in realtime it should make you happy.
https://chrome.google.com/webstore/detail/geelfhphabnejjhdalkjhgipohgpdnoc?hl=en-US
https://chrome.google.com/webstore/detail/cllkoedgiefnomcccogcalmjogjfcpji?hl=en-US
https://chrome.google.com/webstore/detail/cghdkdcepiflkhaddpomjehcmdojgobh?hl=en-US
I found several options that appear as though they should work for you if an emulator/simulator will suffice or at least get you started. The benefit to this is that the Chrome Developer Tools appear to work with the add-ons!
Personally, I would much prefer to do this on actual Android hardware. In usage a touch screen handset is quite different to even the most accurate emulator; things such as gamma, pixel density, performance, touch interaction (are your links big enough?), portrait/landscape orientation and even the fact you hold it in your hand makes it quite different to the desktop experience. If you want to see how well your site works on mobile/Android, get a cheap second hand device to test on!
As for the debugging; I always include my own "log" function which creates a div#console if the firebug/browser console is unavailable. This works reasonably well for debugging on a handset with the caveat that it covers part of the content. You can then print out the current style of an object with something like
log(window.getComputedStyle(document.getElementById("myobj"));
Note: The above will not work in IE.
You may have already seen this, but the SDK Documentation Site has some basic information on developing and debugging web apps on Android:
Web Apps Overview
Debugging Web Apps
Hope that Helps!
I don't know how you detect a mobile device but I detect a client with the user agent. Because of this I can simply send a different user-agent string to test CSS which works fairly well.
For Firefox I use User Agent Switcher. Additionally I use the Web Developer tool not only to view all settings but also the Resize option to simulate the viewport width.
Apple's Safari has a developer extension and within also a User Agent Switcher. You can add your own User Agent string.
Chrome provides tools for doing this now. Just visit:
chrome://inspect/
With your device connected and ADB running - you can then use all of the Chrome web element inspection tools. This works with the browser, but also with any app that renders in a WebView (e.g. Cordova).