Friday, January 22, 2016

File attachments in Android 2.3 and GMail


This post is about how to add attachments in GMail in Android 2.3.x from the file system.

Granted, many people are stuck with Android 2.3.x, so the post is specific to that branch of Android.

GMail app

This happened to me with the GMail app version 2.3.6 in Android 2.3.6 on a lower-end Samsung phone.

A few days ago (that was around 17.05.2015) I was trying to send two crash log files of a different app to its developer via Android's GMail app, and for some reason, sending the e-mail didn't work. I don't quite know why, and I lost the e-mail. One attachment was relatively small, and another was around 860 Kb (a bit large in some respects). I haven't investigated this issue online.

A day later, putting attachments in an e-mail in the Android GMail app and seeing that same letter as a draft in GMail on the web did work:
• If you insert attachments first in the GMail app, then do write some text into the message area, which unblocks the save-as-draft button; save the letter as draft and sync.

I haven't investigated how to do that in a browser in GMail, given that the GMail app method worked out for me.

Thursday, January 21, 2016

Can't see Instagram in Firefox?

Trouble was, that Instagram and embedded Instagram pictures recently stopped loading in Firefox.
This also affects other Gecko-based browsers.
> If you want to skip the story, jump to solution.

While I also use NoScript on desktop Firefox, and on Firefox for Android, all the necessary instagram domains were allowed.

On the desktop, I'm mostly using Firefox 39.0.3, because it plays well with Flash. (There were no issues like that with other browsers.) First I thought, that this was because I wasn't using the latest Firefox. As this Firefox version plays well with Flash, I didn't want to upgrade to the latest version, because with the latest Firefox, Flash playback on YouTube is jerky since Firefox 40.

But the Instagram issue repeated, when I was also using the latest Firefox for Android. Initially I thought, that this was the fault of Instagram, and since I don't use Instagram or Facebook, I didn't think much beyond that. And for a month or so, I couln't resolve it.

But when Instagram showed in a different computer in the latest desktop Firefox (43.0.4) with the same extensions installed, I began to investigate again.

When reloading a random Instagram page while also watching the Firefox Browser Console, I found an error, which, in pasted form, looks like this:
05:16:59.308 An error occurred during a connection to instagramstatic-a.akamaihd.net:443.

Peer attempted old style (potentially vulnerable) handshake.

(Error code: ssl_error_unsafe_negotiation)
1
After some searching, I found the solution in a game forum.

SSL safe negotiation setting

Turned out, that when perusing the Privacy Settings extension of Firefox, I had turned all the settings to most secure, and among them turned on security.ssl.require_safe_negotiation. After I turned that off, Instagram showed again.

If you don't have the Privacy Settings extension installed, go to about:config and type in or paste security.ssl.require_safe_negotiation . The boolean setting value for it should be false. If not (if it's true), then double-click the setting or press enter on it to set it to false. Or right-click for context menu to Toggle.


Otherwise, the Privacy Settings extension is awesome, and I recommend it to everyone.

Whereas people who manage instagramstatic-a.akamaihd.net, should implement new-style SSL/TLS handshakes to keep their corner of the web safe.

So this was the issue that affected me.

NoScript

If, on the other hand, the above is not an issue, then you might be having NoScript installed to defend your browser from malware, and among other things, it's blocking Instagram domains, which means they're not in the whitelist. Jump to domains.

NoScript has a blue "S" button that shows the status of whether a page is completely blocked, half-blocked (content from other domains has been blocked, which is most common), or completely allowed.

That button is usually visible in the location bar, or accessible through Firefox's hamburger menu. (If the blue 'S' is not there either, click the green Customize button in the hamburger menu to see if the NoScript button is listed in the 'Additional Tools and Features' section.)

One can change NoScript domain permissions thus:
* Hover the pointer over the blue "S" button, which launches a menu with a list of domains. If the NoScript menu is very long, it has small up and down arrows for scrolling.
* To whitelist a domain, click on "Allow domainname.tld". Alternately, domains can be blocked by clicking on "Block domainname.tld". This can be done in one go for several domains.
* Once the cursor hovers away from the menu, NoScript will automatically reload the affected page (or pages in other tabs). If a page or pages don't reload (per custom settings), they can be reloaded manually.

For Instagram, the following domain names must be allowed:
platform.instagram.com
instagramstatic-a.akamaihd.net
www.instagram.com
The above are all third-level domains, because they contain three name components separated by periods/dots.

By default, NoScript shows only base second-level domains, such as instagram.com without the www and a dot. For most common users with NoScript, allowing instagram.com and akamaihd.net is sufficient.

Monday, January 18, 2016

Independence Day: Resurgence website and Firefox

A quick post: www.warof1996.com might not display in Firefox and other Gecko-based browsers.

The reason is that the site is based on WebGL, and Firefox blocks WebGL, if the GPU (video card) driver is out of date or does not support WebGL.

The solution in Windows is to update GPU drivers either through the computer manufacturer's website or through the site of the GPU supplier — one of Intel, nVidia, or AMD/ATI, but not limited to only these.

Thorough care should be taken to match the driver to the correct display adapter model.

If that doesn't work, the GPU is too old, or EOL'd.
I strongly recommend not to force Firefox to use WebGL, because this move can damage hardware.
The alternative is to use Google Chrome or Chromium, which probably uses a CPU-based workaround; but if either the graphics adapter or the CPU or both are too old, then rendering is unlikely to work, or is too slow.

> Explanation — contains minimum driver versions that support WebGL.

In addition, visit about:support in Firefox and the Graphics section therein, which also recommends the minimum driver version for WebGL (Direct2D, etc). The posting contains the same warnings about possible damage to hardware if Firefox were forced to use WebGL.

System requirements

This table is incomplete. I've only gotten to test the website on three computers (with some reservations), and gotten an external report about another.
PCHardware/software specifications
CPUGPURAMOSFxChromeNotes
ASUS K53SC notebookIntel Core i3 2310M @ 2.1 GHz, dual-corei: Intel HD Graphics 3000
d: nVidia GeForce GT 520MX
4 Gb DDR3, 665.1 MHzWindows 7 SP1YesYesRequired driver updates: I had to upgrade both Intel and nVidia drivers through downloading them from their respective websites.
ASUS U46SVIntel Core i5 2410M @ 2.3 GHz, dual-corei: Intel HD Graphics 30008 GbWindows 10 (build unknown)SlowNot testedWebsite opens, but performance is slow and jerky, and the fan began working intensely.
d:nVidia GeForce GT 540M
ThinkPad R60e (variant)Intel Centrino dual-coreMobile Intel 945GM Express2 Gb (upgrade from 512 Mb)Windows XP SP3NoNot tested yetInstead of OpenGL, Chrome's default renderer in Windows is ANGLE, which translates OpenGL ES to Direct3D, as it has better driver support. Thus, results for Chrome can differ.
hp dv5204ea notebookIntel Celeron M 410 @ 1.46 GHzMobile Intel 945GM Express1 Gb DDR2, 266 MHzWindows XP SP3NoToo slowWhile I did upgrade the driver, its version is still less than required: The latest Windows XP driver for this GPU is 6.14.10.4926 (dated 15.02.2008), but Firefox wants at least version "6.1400.1000.5218".
PCCPUGPURAMOSFxChrome
All this does not yet indicate much as to what the titular website's actual system requirements are. In notebook computers, the default video card used by any program in Windows is the integrated adapter, while nVidia software provides an option to launch programs using its own GPU.

The Asus notebook with greater specifications falls below the threshold, whereas the Asus notebook with slightly lesser specs, an older operating system and updated video drivers shows the website nicely.

Friday, November 20, 2015

Synaptics touchpad erratic on Knoppix 7.x

The title is self-explanatory. I first discovered this issue with Knoppix 7.0.5 (IIRC), and it continued "well" into Knoppix 7.2 CD versions. I prefer to use CD versions of Knoppix, because of a lack of storage and download speeds. Yes! Mmh!!

Note that to avoid fancy Compiz effects, I almost always use the no3d parameter at Knoppix startup.

The Synaptics touchpad is highly erratic (in Metacity), and until today I had had no solution to make it less erratic. One of the symptoms in a browser, for example, is that text suddenly gets selected and I can't release the selection. No, nothing helps. I could only use the keyboard to navigate, and LXDE/Metacity environments don't appear to have any keyboard shortcut to access the taskbar (start) menu.

There are two things to to keep in mind:
  1. One of the possible solutions is to fall back to Knoppix 6.7.1, which allows a stable pointer with the Synaptics touchpad, but this Knoppix release has outdated software (Iceweasel 6.0, for example).
  2. A workaround in Knoppix 7.x consists of adding the psmouse parameter into the Knoppix start-up command-line:
    knoppix no3d psmouse.proto=imps
    The imps somehow changes the pointer input device. At least on my machine, the immediate effect was that cursor tracking with the touchpad became slower.

    While the terrible and annoying erratic behaviour was not there as much, it still kept being somewhat erratic in other ways, albeit less and in a more manageable manner. Then I discovered the following:
  3. The thing is to never open the CompizConfig Settings Manager. — Because I noticed that it will start changing settings right after it's started or when a user changes settings on their own. That way I have been able to evade issues that cause the pointer misbehave so terribly.

Thursday, September 17, 2015

Nutitelefoni valimine (09.2015)

Ehk peamised kriteeriumid mobiiltelefoni mitte-telefoni funktsioonidele.

Kombineerida saab olemasoleva eelarve piires; heast poest on võimalik osta ka kasutatult, aga uurimistööd tuleb teha rohkem.

Omadused on toodud enam-vähem tähtsuse järjekorras.

Kes on tootja. Tuumarelvi omavate riikide kaubamärke ma ei eelista ega soovita. Selliste riikide hulka kuuluvad näiteks USA, Hiina, India, Prantsusmaa, Venemaa. Ainsaks erandiks oleks Lenovo. kuid valik on mobiili-turul piisavalt kirev. Tuleb siiski tõdeda, et lõviosa tarbe-elektroonikast toodetakse Hiinas.

• Kui kaua kestab aku.

• Kas telefonil on FM-raadio. See on tähtis.

Mälukaardi tugi. Juhuks kui telefoni sisemine mälu täis saab, sest on palju fotosid ja videosid; samuti kaardirakenduste andmed.

Füüsilised omadused


Mõõdud

  • Kompaktsus — et kas telefon mahub püksitaskusse. Väiksemad seadmed mängivad siin rolli. Sest kui telefon ei ole vee- ja tolmukindel, peab ta halva ilmaga olema kuskil taskus, ning kasutada saaks kõnekomplekti.
  • Ekraan. Diagonaali kui mõõteväärtust ma niiväga määravaks ei pea; vt. ülemine punkt. Küll võib tooni anda ekraani resolutsioon, kus suurem resolutsioon (pikselite arv) on teatud veebilehtede kuvamisel määrav siis, kui neid pole mobiiliekraanide jaoks sobivaks küljendatud.

Vastupidavus.

  • Tugevdatud ekraaniklaas. Peaks olema vähemalt Gorilla Glass. Et kui seade kukub, jääks ekraan terveks. Mida suurem Gorilla Glass number, seda parem.
  • Veekindlus on sobiv Põhja-Euroopa kliimas, sest siis saab telefoni kasutada vihmas või udus; näiteks fotode tegemiseks. Väiksem võimalus rikkiminekuks niiskuskahjustuse tagajärjel.
  • Tolmukindlus loeb siis, kui tegutsetakse väga tolmustes oludes või minnakse puhkama lõunamaadesse, kus juhtub olema liivatorme. Arvestada tuleb selliste märksõnadega nagu ehitus, remont, puidutööstus (saepuru), liiv jmt.

Kaamera

    Peavad olema:
  • Autofookus — selleks, et pilt oleks selge. Isegi kui megapikseleid pole palju, on autofookus sama tähtis kui võimendi muusikariistale.
  • Välk. Pimedas pildistamiseks ja ka sellisteks juhtudeks nagu Laulupidu või teised suured kontserdid.
    Parematel ja kallimatel aparaatidel:
  • Pildistabilisaator ehk OIS (i.k. Optical Image Stabilisation) — samuti selleks, et pilt ei tuleks foto tegemisel ise liikudes või telefoni liigutades udune/virvendav. Seadmetel, kus pildistabilisaatorit pole, aga on vaja suhteliselt selgemat pilti kui ise vajutades, saab kasutada kaamera viitsütikut.
  • Tehnoloogiad pimedas või hämaras pildistamiseks. Võrdeline ka toas pildistamisega, kus nähtavast valgustusest tihtipeale ei piisa. Nokia Lumia 920, 925 ja paremad sobivad siia hästi.
    Esikaamera
  • Selfie-de tegemiseks. Isegi kui selfie-sid ei tehta, siis järgmine huvitav punkt oleks
  • Videokõned. Skype vms suhtlusäpis.

    Siin jätaks ma valiku on vabaks, vastavalt eelistustele ja maitsele + järgmine punkt. —
Kaamera megapikselid
Nii põhi- kui esikaamera puhul sõltub megapikselite arv eelarvest.

Kui pildi detailsus pole väga tähtis, siis megapikselite arv ei oma samuti suurt tähtsust.

Eesti mobiili-operaatorite pakutavate odavamate nutitelefonide kaamerad on praegugi peamiselt 5-megapikselised, mis tähendab seda, et suurel osal seadmetest on autofookus juba vaikimisi olemas, ning paljud (aga mitte kõik) on ka välklambiga varustatud. Seega piltide kvaliteedi ja detailsuse alampiir on juba aastal 2015 piisavalt hea.

Määravaks muutub megapikselite arv siis, kui pildistada saab ainult kaugelt, aga tarvis on saada võimalikult detailseid kujutisi, näiteks spordisündmustel. Siin sobiks kindlasti 8-megapikseline või suurem kaamerasensor.

Selliste telefonide hinnad on viimasel ajal alanenud, ning odavama otsa brändide valikus on juba uusi 8-megapikselisi telefone, mille hind jääb alla 100€. Heades poodides on tuntud tootjate 8-megapikselise kaameraga kasutatud telefonid ka umbes 100€ või õige pisut vähema ringis.
Opsüsteemi valik ei ole vähemtähtis: huvitavamate äppide jaoks on parem Android või Sailfish (toetab Androidi äppe), ning nendel saab käitada äppe, mis toetavad kasutaja privaatsust ja turvalisust.

Näiteks konkreetselt Gecko-põhise mootoriga Firefox töötab ainult Androidil (ja Sailfishil). Lisaks on Firefoxile saadaval NoScript, Adblock Plus ja palju muid turvalisust ja privaatsust parandavaid laiendusi.

Kui oma Android pole enam uuendatav ning hiljem ka sellel käiv Chrome lehitseja, siis eraldiseisvat Firefoxi saab pikka aega veel edasi uuendada. Firefox töötab siiani ka Android 2.3 peal. Selle Androidi versiooniga telefonid on tänapäevaga võrreldes suhteliselt nõrgad, kuid näiteks "Postimehe" kodulehe kuvamiseks vaikimisi Android 2.3 lehitseja ei kõlba enam ammu.

Teiste opsüsteemide puhul niisuguseid asju lihtsalt ei ole. Kui tavakasutajale privaatsus väga suureks mureks pole, siis sobib Nokia Lumia ilusti, sest Nokiate Carl Zeiss-i optikaga kaamerad on üle prahi.

Thursday, August 13, 2015

HTC konkurentsivõimest

Disclaimer: HTC ühtegi seadet ei oma

Hiljuti ilmus Delfile omapäraselt alusetut hirmu ja õudu tekitav artikkel HTC kohta, ning otsustasin sellel teemal jagada oma mõtteid, seekord väljaspool kommentaariumi.


Nutitelefoni valijad võiksid mõelda selle peale, et HTC on pärit Taiwanist, mis on demokraatia; Hiina tootjad Meizu, ZTE, Huawei on pärit mandri-Hiinast, mis ei ole demokraatia.
Ehkki Hiina (Rahvavabariik) on mitmeski mõttes avanenud, ning riigis toodetakse peaaegu kõike, on selle maa poliitiline joon muutumatu. Kuigi vähesed poliitilised kommentaatorid on rääkinud Hiinas (või pigem selle seadusandluses) moodustunud proto-demokraatiast, ei ole see võrreldav Taiwanis valitseva tõelise demokraatiaga. Küll pole Taiwan diplomaatliselt tunnustatud riik, ehkki de facto on maa iseseisev. Mõnes mõttes annab selline strateegiline kahesus teatud eeliseid.
Kui oleks valida mandri-Hiina tootjate ja HTC vahel, siis väärtustele tuginedes on HTC oluliselt parem variant.

HTC üks probleemidest on ehk see, et nende tooteportfell on veidi kesine, ning erinevalt Sonyst, Samsungist, LG-st, ASUSest, Huaweist ja mõnedest teistest, on neil vähesele tagasi langeda puhuks, kui turg on küllastunud ja mobiilimüük mitte nii suurepärane. Teise probleemi puhul tekib küsimus, et kas Mandri-Hiina mobiilitootjad müüvad oma kaupa liiga odavalt, mispuhul ei oleks usutav, et see oleks vaid odava tööjõu mõjust.

HTC saaks oma müüki parandada sellisel juhul, kui oma tooteid piisavalt hästi diferentseerida.

LG-l, Samsungil ja Sonyl on teatud mobiilitooted, mis müüvad hästi oma erinevate funktsioonide või välimuse poolest. Näiteks on Sony nišiks väga vastupidavad Z-seeria telefonid.

HTC-l pole selles vallas kerge konkureerida, kui nende praegusel lipulaeval puudub mõni tänapäevastele lipulaevadele omane funktsioon, nagu näiteks optiline pildistabilisaator (OIS).

Senimaani on HTC eelisteks disain ja kõlarid, lukustamata alglaadija (bootloader), ning ka see, et ettevõte uuendab korralikult (ehk järjepidevalt) oma mobiilide tarkvara.

Sunday, July 26, 2015

Copying and pasting table contents into comments in social networks and discussion forums

There isn't much sense in posting whole contents of tables into a comment under a post in most social networks, because directly copied-and-pasted content becomes plaintext, data is misplaced and garbled, because the comment and display area are not wide enough, and the intended overview becomes non-sensical anyway.

One can also choose to copy and paste only the first two columns, by holding down the Ctrl key in Firefox and dragging the mouse cursor across the cells with actual data starting from the ranking.

The data should first and foremost be pasted into a text editor, all the unnecessary data removed, and then copied and pasted here:
Top 10 countries by PEV market share of total new car sales in 2014 and 2013
^ Copied and pasted separately
# Country 2013 2014
1 Norway 13.84% 6.10%
2 Netherlands 3.87% 5.55%
3 Iceland 2.71% 0.94%
4 Estonia 1.57% 0.73%
5 Sweden 1.53% 0.71%
6 Japan 1.06% 0.91%
7 Denmark 0.88% 0.29%
8 Switzerland 0.75% 0.44%
9 United States 0.72% 0.60%
Source:
https://en.wikipedia.org/wiki/Electric_car_use_by_country#Top_10_countries

The result looks much nicer, but is still relatively unwieldy, because of variable-width fonts used by most social networking sites.