Android Back button does not navigate between bottom navigation bar views

I implemented a bottom navigation bar with multiple fragments.  When selecting each view, I added the fragment to the back stack with transaction.addToBackStack(null).   However, when I pressed the back button the fragments switched but the menu item in the navigation bar would not highlight.

 

Apparently, Material design guidelines state “On Android, the Back button does not navigate between bottom navigation bar views.”

 

As a result I needed to remove the call to addToBackStack as the proper behavior is for the back button to go to the previous app or activity.

Best credit card for PPC advertising such as Google Adwords, Facebook Ads or Apple Search Ads

If you use online advertising to promote your apps, goods, or services it might be beneficial to use a credit card that gives you extra points for spending money on online advertising.  The Chase Ink Business Preferred is one of the best business cards you can get.

The Chase Ink Business Preferred credit card awards 3 points for spending in the following categories:

  1. advertising purchases made with social media sites and search engines
  2. shipping
  3. travel
  4. internet, cable, and phone services

This is great if you advertise online with advertisers such as the following.

  • Google AdWords
  • Facebook Ads
  • Apple Search Ads
  • Twitter Ads
  • Ad Colony
  • Vungle
  • Unity
  • AppLovin
  • Tapjoy
  • etc.

Rewards are determined by the type of Merchant Code, the merchant selects.  So if you sponsor or advertise with a podcast that uses the advertising merchant code you may earn 3x rewards for that as well.  All other purchases not in the 3x categories earn 1 point each.

Other benefits of the card include:

  1. No foreign transaction fees
  2. 1:1 point transfer with participating frequent travel programs
  3. Trip Cancellation/Trip Interruption Insurance
  4. Roadside Dispatch
  5. Auto Rental Collision Damage Waiver
  6. Cell Phone Protection for you and your employees
  7. Purchase Protection for 120 days against damage or theft
  8. Extended Warranty Protection

Reward points are included with Chase Ultimate Rewards so if you have a personal credit card that also participates in the Chase Ultimate Rewards program you can easily transfer points between them.  This is powerful when combined with the Chase Sapphire Reserve card which gives you 50% more value when points are redeemed for travel such as airfare, hotels, car rentals and cruises.

Earn 80,000 bonus points with Chase Ink Business Preferred. I can be rewarded too if you apply here and are approved for the Card. Learn more at Chase Ink.

Location of Android SDK folder on Mac

To determine where the Android SDK folder on your computer is located open Android Studio.  Press the Android Studio menu in the toolbar and search for “Android SDK” or navigate there via Appearance & Behavior, System Settings, Android SDK.

The location of the folder is located in the text box near the top that says “Android SDK Location”.

By default the Android SDK location is stored at “/Users/[USER]/Library/Android/sdk” or at “/Library/Android/sdk/”.

Calculate how much you spent on Amazon.com and paid in Sales Tax

If you are doing your taxes or you are just curious to see how much you spend on Amazon.com you might find the Order History Reports feature useful.

If you are filing your US federal income taxes and are taking the state sales tax deduction, you can use the report tool to quickly and easily calculate how much sales tax you paid on Amazon.com.

To get the .csv report go to Order History Reports and select the “Items” Report Type, along with a start and end date, or simply press one of the “Quick Set Options” such as “Last Year”.  After the report finishes generating you can open it in excel or numbers and add a footer field where you can calculate the SUM of the “Item Subtotal Tax” and “Item Total” columns.

Next, generate a report with the “Refunds” Report Type and subtract those totals from your Items’ totals.  If you have a business and you are calculating personal sales tax deductions you will need to remove any business expenses you might have mixed in.  Also, if you are filing jointly or with dependents you should get a copy of your spouses and dependent’s reports as well.

Reference:

Amazon: Create an Order History Report

Amazon: About Tax

How to get a refund from the App Store for an App or In-App Purchase

How to request a refund from the App Store for an iOS App or In-App Purchase

You can request a refund of an iOS App or In-App Purchase from your computer or directly from your iPhone or iPad by following the steps below:

  1. Go to Apple’s “Report a Problem” page at https://reportaproblem.apple.com/
    1. You can also go directly to the app’s report a problem page by pressing the “Report a Problem” link from the email receipt with the subject “Your receipt from Apple.” and a sender of Apple no_reply@email.apple.com
  2. Enter your Apple ID and password when prompted.
  3. From the Purchases -> Apps tab, locate the app and press the “Report a Problem” button.
  4. Select the appropriate problem from the drop down menu and enter a description.
  5.  You should hear back from Apple within a couple of days to a week with your refund.

Note: Individual app developers cannot refund you purchase.  Purchases and refunds are all handled through Apple’s payment system.  However, if you have a problem with the app you should contact the developer first as they may be able to help fix the issue.

 

Reference: https://support.apple.com/en-us/HT204084

How to fix target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/…`

If you are using swift and CocoaPods you may get the following warning after running pod install or pod update:

[!] The `target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/...'. This can lead to problems with the CocoaPods installation

The warning message then gives the following two suggestions:

- Use the `$(inherited)` flag, or
- Remove the build settings from the target.

To implement the first suggestion of using the `$(inherited)` flag follow the steps below:

  1. Open Xcode
  2. From the Project Navigator select your project
  3. Select the Target
  4. Go to the Build Settings tab
  5. Search for “ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES”
  6. Double click on the Yes / No option and select “Other…” instead
  7. Type in the following: $(inherited)
  8. Run pod install or pod update again

How to fix the Swift 4 @objc inference warning

After installing Xcode 9 and migrating to Swift 4 from Swift 3 I received this warning:

The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with “Use of deprecated Swift 3 @objc inference” logging enabled, and then disable inference by changing the “Swift 3 @objc Inference” build setting to “Default” for the “AppName” target.

 

I resolved this issue by going to the projects build target.  Selecting “Build Settings”.  Searching for “Inference” then changing the setting for “Swift 3 @objc Inference” from “On” to “Default”.  If you have multiple targets in your project you may have to do this for each target.

 

If you found this helpful then let us also help you earn more with Apple Search Ads at https://kitemetrics.com/.

Swift 4 substring

After converting my Swift 3 project to Swift 4 I received the warning:

'substring(from:)' is deprecated: Please use String slicing subscript with a 'partial range from' operator.

The old Swift 3 code was

let str = "Some String"
let range = str.range(of:"Some ")
let index = range!.upperBound
let subStr = str.substring(from: index)

The new Swift 4 code for substring is:

let str = "Some String"
let range = str.range(of:"Some ")
let index = range!.upperBound
let subStr = String(str[index...])
Translate »