Friday, October 18, 2013

Some Vendors

A while ago, it was my son's birthday, and I thought I'd get him one of the JXD 7300's. I thought it would be better than the JXD 5110, it is bigger and I thought it would be more useful. I waited too long to order it from China, so I looked for a US vendor. I had no luck finding a US vendor. I thought I might be OK getting it express shipped. 

I ordered it on a Thursday, and paid the extra $30 for 3-5 day shipping. The device arrived 15 days later. The correspondence with the company was challenging. On Sunday they sent me a note:

Since the value for your order is a little expensive, to protect the safe of your paypal account,

we want to confirm some info from you, hope your kindly understanding.
1st,  Could you pls confirm your shipping address whether correct or not

Well I appreciate that they are worried for my safety, but $144 isn't that much, I have spent way more than that on Paypal before. I also realize it is already tomorrow in China, so my Thursday order was really Friday early morning, and the Sunday correspondence was really Monday, but follow along. I did tell them that it was me, and that I thought my Paypal account was verified. I responded on Sunday, which I am sure they got on Tuesday. Their response Monday at 2AM my time was:

May I know when do you expect to receive the parcel? then I will arrange a shipment, since normally we will ship the order within 3-7 working days.

Ok, shouldn't they expect that if I paid for 3 day shipping I might want it really soon? What is there about 3-7 working days before they ship it? Holy cow, it seems really obvious now I am not going to get the thing in time. So I decide to look for a new vendor, maybe someone in the US. I look, and there is a vendor in New Jersey who has 10 of them listed on Ebay. I decide to order the one from ebay, and try to work something out with this Chinese vendor.  

I sent the following message:

I expect to receive the device by Thursday 10/10/2013.

The response I got was:

Hi friend,
Thanks for your email.
I will ask the warehouse to ship it by Thursday, pls wait patiently.
Hope your understanding in advance.

Best regards,

This is almost comical. I want it by Thursday, so they will ship it by Thursday? Maybe they know it is yesterday here in the US, so they can ship it and it will arrive Tomorrow? By now, I've had enough, since this won't make it even the week of my son's birthday, so I am ok with cancelling the order. Remember the first message, they weren't even sure it was me, they ought to be cool with me cancelling the order. I send a note back:

I wanted it at my house on Thursday!

Can we just Cancel this order?

Wow, that seems pretty clear. I am asking, not telling, but I have things arranged, and I no longer want the unit from them. Their response is:

Hi friend,
Even though we ship it yesterday, it is impossible to arrive you in one day. It will usually will take 3-7 working days via DHL.
We will urge the warehouse to ship it in 1 day, is it OK?
Looking forward to your reply.
Best regards,

Did they ship it yesterday? Am I in a time warp? I realize they are adjusting days, and this message I got on Wednesday, I know I don't want it. I did send them a note, that I thought was pretty clear:

If you are going to ship it anyway, then it doesn't matter.

It will be late, and I will just give your company a bad review.
I'd rather you not ship it, refund my money and we both
go away disappointed.

Is this clearer? "I would rather they not ship it and refund my money". I felt that was pretty clear. They did send one more note:

Hi friend,
Thanks for your email.
We will ship it today, pls wait for a while patiently.

It arrived 9 days later. Unbelievable, did they expect me to say good things about them? What do you think, did I miss something? I've bought most of my Arduino stuff from China, and I expect those things to arrive at my house 2-3weeks after I pay for the item. This took 2 weeks using express mail! I don't get it. 

I'll share the vendors name, if you ask. 

Sunday, October 6, 2013

Starting With Android Studio

Over the summer, well at GoogleIO, Google introduced a new way to develop apps for Android, called Android Studio. Android Studio is based on IntelliJ instead of Eclipse. I've been using Eclipse for 7 years, so this change might be a challenge.

The install was really straight forward. Everything is on The link about halfway down the page will have the various install packages, one for Windows, one for Mac and another for Linux. The only thing these packages don't include is the JDK.

I had a JDK6 installed on my Linux box, and was able to install without any issues. I adjusted my PATH environment variable in the bashrc file, and everything worked the second start (the first start complained about double something being created). seems generic, but that is what they use.

Once it came up, there was the tip of the day, and then a warning that there is a new update. There wasn't anything obvious about the update, and how to get the update. I clicked on the "more info" button, and it said to go to help->Check for updates in the menu. I clicked that, and it offered "get updates and restart". The studio GUI went away for about 2 minutes, and gave me status of what is happening. Applying patch was the longest part.

Once it comes up, it starts with a prebuilt app called "My First App". Not sure what it is, but it is a place to start.

The developers page has a link to some tips. These tips offer easier ways to do some editing, and navigation using control keys like emacs and other editors.

The layout editor give an easy start, but isn't intuitive. I added a button, and it looked like it was attached top and center. When I re-sized the button, it jumped to the upper left. The proper way to re-size the button was to change the text and font. I'll have to play with that a little more, so I can figure out how to align buttons and such (assuming I have an app with many buttons).

Most of the default devices are Nexus, and generic low resolution ones. I don't think a 5.4" screen will likely come in 480x854 pixels. I created a Galaxy NoteII with a 5.5" screen at 1280x720 pixels, since that is a phone I use. It doesn't reall matter, since whatever you create will just change presentation on the different devices.

At the top of the edit area, are tabs for the editable stuff, and at the bottom are the tabs for the view. The view can be changed between "Design" and "Text". Design is the drag and drop part. Text is the place where the XML and Java are edited for the project. The java code is where the callbacks and such go. The XML is where the properties of the display is set. While much of the screen layout can be adjusted in the drag-n-drop section, sometimes certain tweaks require editing the XML.

Building is easy, pressing the build menu, and selecting make project will create a set of executables that can be used to build an APK file. The APK file must be signed with a given key. Either a self signed key, or an official key from a register can be used. To self sign an app for testing, you can use the Keytool.

Once your app is running in the emulator (and maybe on a device), the adb tool can be displayed. Selecting on the Android in the bottom part of the frame, or selecting run->debug from the top menu, will enable debugging.

This is a powerful tool. Android Studio has many options, and will take some getting used to. It may not happen the first time you use the tool, or the second time, but it will be a good tool to use.

Give it a shot!