2016-10-24

Can't transfer a file from my phone to Mac using bluetooth

TL;DR: Check that 'Bluetooth Sharing' is enabled under 'System Preferences' -> 'Sharing'.

I took a picture and wanted to deal with it using a Mac. I thought: 'It is just too easy. I'll use bluetooth to transfer it'. Not so fast.

I couldn't see the Mac from the phone and I didn't see any hint about it not being visible from 'Bluetooth Preferences'. 'Interesting glitch', I thought, deciding to try rendering the phone visible and pairing it from the Mac.

That being successful, I then selected the picture, chose 'Share', 'Bluetooth', the Mac, and... 'Transfer failed'.

'Joy', I thought, 'another Apple-not-playing-ball issue'. So I decided to try to browse the files in the phone from the Mac, to which the Mac replied, 'The device does not have the necessary services'.

Solution came from: Google 'galaxy s5 cannot pair with mac', then https://discussions.apple.com/thread/6098837?tstart=0

Total time spent: about 30 minutes.

Thank you again, Apple. <sarcasm />

2016-10-20

Javascript 'wat' moments

The new 'let' (ES2015) brings some interesting questions.

Since it makes the variable limited to the scope where it was declared, as opposed to the 'var' which puts the variable in the function scope, what happens when we refer to it from within a lambda function reference?

Check out this JsFiddle for an illustration of the question.

What do you think you're going to see?

The first function block doesn't surprise me. The variable is not evaluated until the lambda function is executed.

For the second function block, I, for one, was expecting some 'Undefined reference' errors on line 18.

Then I executed it. wat? I concluded that the Javascript gods decided to add one more black magic and detect that the variable would not exist when the lambda function would execute.

A friend tried to convince me that I was wrong and that actually a copy was being made for the 'let', so we wrote the third function block. WAT? I certainly wasn't expecting that.

wat?

2016-09-19

Meu Android ignora pausa + extensão em números nos meus Contatos

Resumo

A funcionalidade de "Código do provedor de serviço" não funciona com pausas. Desative-a assim: 

  1. Abra o 'dialler' (teclado de discar)
  2. Abra o menu do 'dialler' (ícone dos três pontos verticais)
  3. Selecione 'Configurações'
  4. Selecione 'Chamadas'
  5. Selecione 'Código do provedor de serviços' (no meu Galaxy S5 é a primeira opção)
  6. Desmarque 'Automático - Insere o código automaticamente'.
Infelizmente é possível que você tenha que entrar com o código manualmente em cada contato.

Resposta longa

Uso com frequência a funcionalidade de pausa nos números para entrar extensões e códigos de serviço automaticamente. Moro no exterior e recebi um Galaxy S5 usado, da Claro Brasil, de presente.

Um caso desses é um serviço de chamada internacional chamado One Suite que me pede o código do usuário antes de poder discar o número internacional. Exemplo:

555-666-1234
(Gravação:) Entre com o seu código
123456
(Gravação:) Entre com o número a discar
etc.

Pra agilizar o processo, adicionei um contato chamado 'Plano Internacional' com o seguinte número:

5556661234,123456

Funcionava perfeitamente, até eu começar a usar esse telefone brasileiro.

Como sou teimoso ao extremo e não uso apps se puder evitar, decidi descobrir o porquê.

Como já trabalhei com telefonia móvel, sabia que as operadoras brasileiras tinham aplicativos que capturavam a tentativa de chamada pra fazer algo com o número e desconfiei que um aplicativo desses estivesse quebrando o processo de pausa de discagem.

Procurei na lista de aplicativos, mas já tinha desativado tudo.

Não tenho chip da Claro, o que descarta aplicativo SIM.

Finalmente fui procurar no menu de configuração de chamadas e achei o "Código do provedor de serviço". Desativei o bicho, e mágica! Meu número com pausa funcionou.

Desconfio que seja um problema principalmente brasileiro, então decidi escrever esse relato em português mesmo.