Posts

Showing posts with the label Android

Android Cheatsheet

The best part about android now days is how easy firebase makes things. I could probably just get rid of all my notes and just list off all the firebase examples I used in the past but I think in the future I will have a few projects non-firebase. http://www.gradle.org/ http://stackoverflow.com/questions/16718026/how-to-build-an-android-library-with-android-studio-and-gradle http://stackoverflow.com/questions/26554996/change-toolbar-color-in-appcompat-21 http://stackoverflow.com/questions/5861661/actionbar-text-color http://stackoverflow.com/questions/13724007/how-to-send-notifications-from-a-website-to-an-android-app https://github.com/jreyes/UdacityXYZReader http://www.recursiverobot.com/post/60331340133/very-simple-example-of-a-loader-and-loadermanager http://stackoverflow.com/questions/22821139/how-should-i-track-fragments-in-google-analytics-v4 http://stackoverflow.com/questions/25381435/unconditional-layout-inflation-from-view-adapter-should-use-view-holder-patter ht

MyPatco Roadmap for 2017

   If you have been following updates on mypatco's twitter account then you know that there has been a lot of updates since the initial release of mypatco. Now what I want to do is make plans for whats lays ahead for this project which I've been spot on for getting things do so far.  The highest on my list is finishing the ios app. The second is the app indexing because I think it will greatly help the app's grow faster than it currently is, which isn't bad but just simply improve out of interest. The end goal of this app is to become the number one app for patco and provide a great user experience for patco users even if I no longer use it. Third update is more straight forward and almost done. Just display the messages in the email as alerts on the mobile devices. The feature I would like to add to this requires a little oversight on my part but ultimately become  a tool for me to perform quick group updates for schedules on the fly. This is one way I see it and anot

Material Angular Time Picker

Image
    Continuing off my article on android's material timepickers I wanted to include this feature in the web based version of mypatco. I don't think it will be officially included in the material angular project but just something I could have as my own and if anyone comes across it to use it just as any other component. The key difference with timepickers vs. datepicker just picking time, since time is a more necessary feature for cases like notifications or alerts/alarms. Missing Cancel/Ok Buttons First and foremost I recommend checking out the project which I forked to personalize and strip out any code related to datepicker. Since the datepicker is already implemented in material angular, instead I'm just going to focus on time pickers.   The rest of my notes are in the repo's issue tracking . You may see the results on mypatco.org for an example.

Android: Retrieving SHA1 key for Firebase on Windows

    If you using firebase and want to debug for Oauth or Messaging you will need to add a certificat e  SHA1 from your app key. You might need it for other features but this is what I'm sure about. Assuming java is installed then wherever you java is installed is where you will need to point to for  Example of File location C:\Program Files (x86)\Java\jre1.8.0_60\bin Command "keytool -exportcert -list -v -alias "YOURALIAS"  -keystore YOURKEYFILE.jks > file.txt"  I would output to a file so you can copy it later... Resources Authenticating Your Client

My Patco Now Runs on Firebase

   Over the past two months I've do to made a critical decision due to costs and completely redid the backend for mypatco. Of course there was breaking changes but that wasn't related to the bad reviews that came in (caused by another developer). Instead of using azure now the app is hosted on firebase which everything I need starts out for free. Key Features Free Https Later needed for Geolocations Free use of Custom Domain  *Databasing (real-time) Json type database greatly reduces time for developing with api's Static Hosting Plugins for Angular with Database Authentication The first two really sold me on the idea but the static hosting had me worried since a lot of my data was handle at the middle tier level. Pretty soon though I had my data flatten and it just made sense but the process of updating my database is still in the works luckily though not all my code had to be scraped. To get the database corrected I still have my azure code to handle th

Firebase Realtime Data - "setPersistenceEnabled() must be made before any other usage"

    Just a small issue I encountered with my android app with how to correctly implement firebase real time data to be persistent. I did found a few notices on how to correct this and most of them was just making the database instance static or with a flag to see if the object wasn't already created. A better solution would be having the later version of the object handle this in a method. What I did was just wrap it with my own object and create a method like its explained in the github issue. The purpose of this post is really just make the information more available and public so the documents get updated or the code get addressed. Code public class FirebaseUtil { private static FirebaseDatabase mDatabase ; public static FirebaseDatabase getDatabase() { if ( mDatabase == null ) { mDatabase = FirebaseDatabase. getInstance (); mDatabase .setPersistenceEnabled( true ); } return mDatabase ; } } Usage DatabaseRef

My Patco - Version 14

    My goal for the support of "My Patco" is to create updates every once a month, and have the schedule automated from here on out. I think for the next few months I will need to validate most of my work but for the most part the updates coming in the end of this should really start to be stable. Initially I created the database around google's train system standard however looking things from a direct approach this approach doesn't need the same level of architecture. In fact it hurts me because I'm constantly looking for things and need to join tables just to query a single schedule. I could probably do it all with just two parameters.    For I'm aiming to finishing this version up which requires some work on the backend more than the app but users should see the app respond a lot faster. I know there was a bug when I released but had to meet my deadline or else I would just keep pushing it back. Things like that can happen a lot if your just doing it for

Make Android studio behave like Visual Studio

    I really enjoy using Android Studio compared to eclipse, a years ago I would be frustrated looking for things but now days this isn't the case. With my job I need to use Visual Studio and over the course of five years I think I've mastered most of the hotkeys. The transition isn't too much difficult between the two but it can get annoying with the hotkeys. Also I want to say love look of both IDE's so other than functionality the two are awesome tools to work with. Prevent Last Project from Auto Opening    I sometimes forget what my last project even was, thankfully its a simple to fix. Open your Setting and under General remove the check for "Reopen last project on startup" and you're done! Prevent Auto Gradle Running  This really slow things down when starting up. If its know working project doesn't make sense to just waste time processing. I'm talking about projects where the dependencies are already included. Disable Gradle auto

Retrofit Callback instead of Async Handler

   For a quick and dirty solution I used an async handler in my activity, to call an api. I sometime need to see things work right for a sanity check, and win whatever small achievement it holds. Whether its just to reassure me I'm on the right path. So below is a quick and simple change but makes all the difference. @GET ( "/GetTimes/{id}" ) public ArrayList<YourObject> GrabData ( @Path ( "id" ) String id); vs @GET ( "/GetTimes/{id}" ) void GrabData( @Path ( "id" ) String id, Callback<ArrayList< YourObject >> callback); Resources using Square's Retrofit networking library Retrofit.Callback's success() and failure() If you callback is in a fragment Receiving custom parameter in retrofit callback

Installing Android Studio Beta 0.8.14 exe

Image
    This wee k I installed android studio however but I didn't want manually install it and to use the zip file. So looked for the appropriate exe file (if there was any). In the recent  notes there is explanation on why the zip version pointed the download link. I installed v.0.8.14 but I pretty sure I wasn't paying attention because there is later versions available. Infact the release  Candidate 4  was updated just yesterday but v0.8.14 is what's currently listed on the downloads .  Notes (v.0.8.14)  after my install for android studio, prompted to startup the application but got that jvm missing error. When I ran the application myself and it worked fine. Also the icon is different for the program in the taskbar from the zip to the exe file. After running both the zip and the exe files, both made a configuration in the user's folder but only one of them was called beta.  After pinning the program to the taskbar, the program duplicated itself. I then tried

Android Studio 'tools.jar' file is not present in classpath

Image
     I move around from machine to machine a lot and this is an issue hidden in another form. The error doesn't really help but it is clear something is missing. Two things that I was missing was the correct file path to my sdk and didn't the JRE included/installed. Things to make sure you always do install the JDK  and  JRE install the version you want 64 or 32 bit sometimes I install both just to be safe but I don't like to do that. create the environment path JAVA_HOME sometimes the installer doesn't create this... path (64 bit) should be something like..   C:\Program Files\Java\jdk1.8.0_25      Right click on the window icon in the right and go to systems (advanced settings). Notes https://www.java.com/en/ - Does not include the JRE. http://www.oracle.com/technetwork/java/javase/downloads/index.html Resources ide - Android Studio 'tools.jar' file is not present in classpath - Stack Overflow  - Linux help Getting Started wit

Galaxy S Fascinate SCH-I500 Notes

Samsung Galaxy S/SCH-I500 - XDA-Developers Samsung Galaxy S/SCH-I500/Building The Kernel - XDA-Developers [ROM][9/25/12] MIUI.us Presents MIUI v4.1 2.9.21 Jelly Bean [4.1.1][Stock CM9 Kernel] - xda-developers Divers Samsung Galaxy S® 5 16GB in Black Support | Verizon Wireless Cyanogenmod Resources Devices Overview - CyanogenMod Information: Samsung Fascinate ("fascinatemtd") - CyanogenMod CyanogenMod Downloads CyanogenMod/android_device_samsung_fascinatemtd

Nexus 7 Not Appearing Over the USB

Image
    This should have been a easy setup but since I ran into a few problems that weren't simple nor obvious I thought I would share and record my notes. For much of my android development I use the ADT Bungle for Windows , I have the Android Studio Development but just playing out with it. Regardless the problem with my setup was my Nexus 7 not appearing. At this point I had already gotten the debugger mode enabled and the usb connected but still 'adb' is not seeing my device.      Simply put the Nexus 7 by default (for me at least) was set to MTP and if you can see the connection mode notification can change it from there to PTP. The notification for me appeared briefly, so what I did was have the notification bar open as I plugged in my nexus. Notification will appear below USB debug Unchecked MTP and Check PTP The first link you below holds the location where to install drivers for your windows setup which you might need to know for when you switch from

HTML5 Audio doesn't Autoplay for Chrome on Android

    Recently I was playing Penguins Rising on my nexus 7 and notice that the background music wasn't playing but strangely all the other sounds were. After a hard look at the code, I found no reason for the audio not to be work. So I could tell right away this wasn't going to be an easy fix. The first thing I did was check the support to see if   the HTML5 audio element  had any support issues. Since the support for the audio element seemed to be alright with what I was using, the next thing I thought was that it must be the attribute  autoplay . Its important to note that I am also using the loop attribute but I will return to that later. Example from Penguins Rising < audio autoplay loop > < source src = "content/ArcticWind.wav" type = "audio/wav" > < source src = "content/ArcticWind.ogg" type = "audio/ogg" > < source src = "mp3/ArcticWind.mp3" type = "audio/mpeg&qu

Using TFS with Eclipse

Image
This article is from the experience I gain while setting out to complete my capstone and a point in time where I was exploring that ways to manage a team. I also wanted to help move things forward with the process for the team to code rather than spending more time on design. My capstone was along the side with three other colleagues and we did not all have the same idea with what systems or tools should be in place to help us achieve our tasks. Still after the fourth change of repository system in my team, I figured it was time that I took charge and started making changes for the better with my suggestion to use TFS. Plugin :  TFS Plug-in for Eclipse | Eclipse Plugins, Bundles and Products - Eclipse Marketplace Right Click Inside Project Explorer > Team > Shared Project The following plugin behaves much like the native built-in tool for visual studio but with a slight twist for the  tab locations because of how eclipse is setup. At first when I started researching thi

Popular posts from this blog

UI-Bootstrap Collapsible Sticky Footer

Installing Windows on Acer chromebook 15 cb3-532

Aspetcore: NLog with Postgresql