Showing posts with label IOS. Show all posts
Showing posts with label IOS. Show all posts

Monday, 11 September 2023

Paw-sitive Progress: Mobile App Development Revolutionizing Pet Care.

 In today's digital age, mobile apps have become an integral part of our daily lives, and the pet care industry is no exception. As pet ownership continues to rise worldwide, so does the demand for convenient and innovative solutions to manage and enhance the well-being of our furry friends. Mobile app development for pet care has emerged as a valuable tool for pet owners and pet care professionals alike, offering a range of features and benefits that cater to the diverse needs of pets and their owners.

The Pet Care Industry's Growing Importance

The pet care industry has undergone significant transformation over the past decade. It's no longer just about providing food and shelter for our pets; it's about ensuring their physical and emotional well-being. With the increasing recognition of the importance of pets in our lives, people are investing more time and resources into their pets' care.

Mobile apps in the pet care sector have evolved to address these changing needs, providing solutions for pet owners that include everything from health tracking and training tips to social networking for pet lovers. Let's explore some of the key features and benefits of mobile app development for pet care.

Health and Wellness Tracking

One of the most valuable features of pet care apps is their ability to track and manage your pet's health and wellness. These apps often include features like vaccination reminders, medication schedules, and weight management tools. They allow pet owners to keep a comprehensive record of their pet's health, making it easier to detect and address any issues early on.

Pet Social Networks

Pet owners love to connect with others who share their passion for animals. Mobile apps dedicated to pet care often include social networking features that enable users to create profiles for their pets, share photos and videos, and connect with other pet enthusiasts. These networks create a sense of community and provide a platform for discussing pet-related topics, seeking advice, and even arranging playdates for pets.

Pet Services Marketplace

Mobile apps can also serve as a marketplace for pet-related services. Users can find and book pet grooming, pet-sitting, training, and veterinary services through these apps. This streamlines the process of finding trusted professionals to care for your pet's needs.

Training and Behavior Support

Training and behavior are essential aspects of pet care, and mobile apps have stepped in to provide guidance and support. These apps often offer training videos, tips, and step-by-step guides to help pet owners address common behavioral issues or teach new tricks.

Emergency Services

In times of crisis, quick access to emergency services is crucial. Pet care apps can provide users with information about nearby emergency veterinary clinics, animal shelters, and other critical resources. Some apps even offer features like pet identification and medical records storage, ensuring that essential information is readily available in an emergency.

How to Create A Pet Care App as Special as the Pets

As pet ownership continues to soar and the human-animal bond strengthens, there's an increasing demand for innovative solutions that cater to the unique needs of pets and their owners. A pet care app has the potential to be a valuable tool for pet lovers, offering a wide range of features to make pet care more convenient, efficient, and enjoyable. In this guide, we'll explore the steps to create a pet care app as special as the pets themselves.

  • Market Research and Identifying Niche: Begin by researching the pet care market to understand your target audience and identify potential gaps or unmet needs. Determine whether you want to focus on general pet care or specialize in a particular niche (e.g., dog training, cat health, or exotic pet care).
  • Conceptualize Unique Features: Think about what will set your app apart from the competition. Unique features can include AI-driven pet advice, gamification for pet training, or social networking for pet lovers.
  • User-Centric Design: Design an intuitive and user-friendly interface that appeals to both tech-savvy and non-tech-savvy pet owners. Prioritize easy navigation, clear icons, and a visually appealing layout.
  • Health and Wellness Tracking: Include features for users to track their pets' health and wellness, such as vaccination schedules, medication reminders, and weight management tools.
  • Social Networking for Pets: Create a community aspect where users can create profiles for their pets, share photos and stories, and connect with other pet enthusiasts. Consider implementing features like pet adoption listings or lost-and-found pet alerts.
  • Pet Services Marketplace: Integrate a marketplace for pet-related services like grooming, pet-sitting, training, and veterinary care. Ensure a secure and user-friendly booking and payment system.
  • Training and Behavior Support: Provide valuable resources for training and behavior management, including video tutorials, expert advice, and progress tracking.
  • Emergency Services Locator: Include a feature that helps users locate nearby emergency veterinary clinics, shelters, and other critical pet services in times of need.
  • Personalized Recommendations: Use AI and machine learning to offer personalized pet care recommendations based on the user's pet's breed, age, and health status.
  • Security and Privacy: Implement strong security measures to protect user data, especially if the app stores sensitive information like pet health records. Be transparent about data usage and obtain user consent.

Conclusion

Mobile app development for pet care has evolved to meet the changing needs of pet owners and the pet care industry. These apps offer a wide range of features and benefits that enhance the well-being of our beloved animals while making pet ownership more manageable and enjoyable.

As the pet care industry continues to grow and innovate, we can expect even more sophisticated and user-friendly mobile apps to emerge, further enriching our lives and the lives of our four-legged companions. Whether you're a devoted pet owner or a pet care professional, embracing these technological advancements can help you provide the best care possible for our furry, feathered, or scaly friends.

Thursday, 24 August 2023

Revolutionizing E-commerce: Unveiling the Open Network for Digital Commerce (ONDC).

 In today's rapidly evolving digital landscape, the need for efficient and standardized systems to facilitate e-commerce and digital transactions has never been more pressing. The Open Network for Digital Commerce (ONDC) emerges as a promising solution to streamline and enhance the digital commerce experience for businesses and consumers alike. In this blog, we'll delve into the world of ONDC, understanding its significance, features, and potential impacts on the e-commerce ecosystem.

Understanding ONDC

ONDC, or the Open Network for Digital Commerce, is an ambitious initiative launched by the Government of India to create an open, secure, and interoperable framework for digital commerce operations. The goal of ONDC is to establish a unified digital ecosystem that empowers businesses, especially small and medium-sized enterprises (SMEs), and consumers to conduct seamless transactions online.

Key Features of ONDC

Interoperability: One of the standout features of ONDC is its focus on interoperability. It aims to bridge the gap between different players in the e-commerce ecosystem, such as sellers, buyers, payment gateways, logistics providers, and more. This interoperability fosters collaboration and makes it easier for businesses to expand their reach without being tied to a single platform.

Unified Catalog: ONDC envisions creating a centralized product catalog that allows sellers to list their products and services in a standardized format. This reduces redundancy and ensures that consumers have access to accurate and up-to-date information across various platforms.

Simplified Onboarding: Small businesses often face challenges when onboarding onto e-commerce platforms due to technical complexities. ONDC aims to simplify this process by providing easy-to-use tools and interfaces that enable sellers to quickly set up their digital storefronts.

Data Security and Privacy: ONDC places a strong emphasis on data security and privacy. The framework aims to ensure that user data is handled responsibly and that consumers have control over how their data is used.

Innovation: While ONDC seeks to standardize certain aspects of digital commerce, it also encourages innovation. Developers and businesses can build applications and services on top of the ONDC infrastructure, fostering a dynamic and diverse ecosystem.

Benefits and Impact

The implementation of ONDC could bring about several positive impacts:

  • Empowering SMEs: Small businesses often struggle to gain visibility and compete with larger players in the e-commerce landscape. ONDC provides these businesses with a level playing field, allowing them to reach a wider audience without the barriers of proprietary platforms.
  • Reduced Fragmentation: Currently, e-commerce platforms often operate in silos, leading to fragmentation and inefficiencies. ONDC's standardized approach could bring cohesion to the ecosystem, making it easier for consumers to find products and services.
  • Enhanced Consumer Experience: With a unified catalog and improved interoperability, consumers can enjoy a smoother shopping experience. They can discover products more easily and have confidence in the accuracy of product information.
  • Innovation and Growth: By providing a foundation for developers to build upon, ONDC could spark innovation in the digital commerce space. New applications, services, and features could emerge, catering to evolving consumer needs.

Conclusion

The Open Network for Digital Commerce (ONDC) represents a significant step forward in the evolution of e-commerce. By focusing on interoperability, standardization, and security, ONDC aims to create a more inclusive and efficient digital commerce ecosystem. As the initiative progresses, it has the potential to reshape how businesses and consumers engage in online transactions, fostering growth, innovation, and empowerment along the way.

Friday, 2 June 2023

Creating an Efficient Shopping Cart with No Code: A Step-by-Step Guide.

 In the digital era, e-commerce has revolutionized the way we shop, and having a functional shopping cart is essential for any online store. Traditionally, building a shopping cart required programming knowledge and coding skills. However, with the rise of no-code development tools, creating a shopping cart has become more accessible to non-technical individuals. In this blog post, we will guide you through the process of building a shopping cart without writing a single line of code.

Step 1: Choose a No-Code Platform

To create a shopping cart without code, we need a no-code platform that provides pre-built components and functionality. There are several options available, such as Webflow, Bubble, and Adalo. In this guide, we will use Bubble.io, a popular visual development platform.

Step 2: Set up your Project

Sign up for an account on Bubble.io and create a new project. Once you're inside the Bubble editor, you'll see a blank canvas to start building your shopping cart.

Step 3: Designing the User Interface

A visually appealing user interface plays a crucial role in attracting and engaging customers. With Bubble.io's drag-and-drop interface, you can design your shopping cart by placing elements like buttons, input fields, and images on the canvas. Consider the following elements for your shopping cart UI:

  • Product Listing: Display your products with images, titles, prices, and an "Add to Cart" button.
  • Cart Icon: Include a small cart icon that users can click to view their cart.
  • Cart Popup: Create a pop-up window that appears when users interact with the cart icon, displaying the selected products and a checkout button.
  • Checkout Page: Design a separate page where users can review their cart items, enter their shipping and payment details, and complete the purchase.

Step 4: Creating Data Types

To store and manage data related to products, user information, and orders, we need to define data types. In Bubble.io, you can create data types like "Product," "User," and "Order" using the visual interface. Determine the necessary fields for each data type, such as name, price, image URL, and quantity.

Step 5: Adding Interactivity

Now it's time to make your shopping cart functional. We'll add interactivity to allow users to add products to their cart and proceed to checkout. Follow these steps:

  • Add a workflow to the "Add to Cart" button. When clicked, create a new order item in the database, associating it with the user and the selected product.
  • Create a workflow for the cart icon. When clicked, show the cart popup.
  • In the cart popup, display the user's order items using a repeating group. Include buttons to increase/decrease quantities or remove items from the cart.
  • Add a workflow to the checkout button in the cart popup. When clicked, navigate the user to the checkout page.

Step 6: Implementing Checkout Functionality

On the checkout page, users should be able to review their cart items, enter their shipping and payment details, and complete the purchase. Here's how you can achieve this:

  • Create input fields for shipping information (address, name, etc.) and payment details (credit card number, expiration date, etc.).
  • Implement a workflow for the checkout button. When clicked, create a new order in the database, associating it with the user and their order items. You can also integrate with a payment gateway, such as Stripe, to process the payment.
  • Provide a confirmation message or redirect users to a thank-you page after a successful purchase.

Step 7: Testing and Deployment

Before making your shopping cart live, thoroughly test its functionality. Ensure that products can be added to the cart, the cart updates correctly, and the checkout process works smoothly. Once you're satisfied with the results, deploy your shopping cart on a hosting platform of your choice or use Bubble.io's built-in deployment options.

Conclusion:

Building a shopping cart without code is now a reality, thanks to no-code development platforms like Bubble.io. By following this step-by-step guide, you can create a visually appealing and functional shopping cart for your online store, all without writing a single line of code. Embrace the power of no-code tools and unlock new possibilities for your e-commerce business. Happy cart building!

Friday, 1 December 2017

HB Blog 149: Cross Platform Development.

In computing, cross-platform software (also multi-platform software or platform-independent software) is computer software that is implemented on multiple computing platforms. Cross-platform software may be divided into two types; one requires individual building or compilation for each platform that it supports, and the other one can be directly run on any platform without special preparation. Cross-platform programming is the practice of actively writing software that will work on more than one platform.
There are a number of tools which are available to help facilitate the process of cross-platform programming:
  1.     8th: A cross-platform development language, which utilizes Juce as its GUI layer. The platforms it currently supports are: Android, iOS, Windows, macOS, Linux and Raspberry Pi.
  2.     Anant Computing: A mobile application platform that works in all Indian languages, including their keyboards, which is also supports AppWallet and Native performance inside all operating systems.
  3.     Appcelerator: It helps in building native apps by deploying just a single JavaScript code base. It provides your web content in a native application, ensuring your code is not wrapped around a web container unlike few other such solutions.
  4.     AppearIQ: A framework that supports the workflow of app development and deployment in an enterprise environment. Natively developed containers present hardware features of the mobile devices or tablets through an API to HTML5 code thus facilitating the development of mobile apps that run on different platforms.
  5.     Cairo: A free software library used to provide a vector graphics-based, device-independent API. It is designed to provide primitives for 2-dimensional drawing across a number of different backends. Cairo is written in C and has bindings for many programming languages.
  6.     Cocos2d: An open source toolkit and game engine for developing 2D and simple 3D cross-platform games and applications.
  7.     Delphi: A cross platform IDE, which uses Pascal language for Development. Currently it supports Android, iOS, Windows, macOS.
  8.     Ecere SDK: A cross platform GUI & 2D/3D graphics toolkit and IDE, written in eC and with support for additional languages such as C and Python. Currently it supports Linux, FreeBSD, Windows, Android, macOS and the Web through Emscripten or Binaryen (WebAssembly)
  9.     Eclipse: An open source cross-platform development environment. Implemented in Java with a configurable architecture which supports many tools for software development. Add-ons are available for several languages, including Java and C++.
  10.     FLTK: Another open source cross platform toolkit, but more lightweight because it restricts itself to the GUI.
  11.     fpGUI: An open source widget toolkit that is completely implemented in Object Pascal. It currently supports Linux, Windows and a bit of Windows CE.
  12.     GeneXus: A Windows rapid software development solution for cross-platform application creation and deployment based on knowledge representation and supporting C#, COBOL, Java including Android and BlackBerry smart devices, Objective-C for Apple mobile devices, RPG, Ruby, Visual Basic, and Visual FoxPro.
  13.     GLBasic: A BASIC dialoect and compiler that generates C++ code. It includes cross compilers for many platforms and supports numerous platform (Windows, Mac, Linux, Android,iOS and some exotic handhelds).
  14.     GTK+: An open source widget toolkit for Unix-like systems with X11 and Microsoft Windows.
  15.     Haxe: An open source cross-platform language.
  16.     Juce: An application framework written in C++, used to write native software on numerous systems (Microsoft Windows, POSIX, macOS), with no change to the code.
  17.     Lazarus: A programming environment for the FreePascal Compiler. It supports the creation of self-standing graphical and console applications and runs on Linux, MacOSX, iOS, Android, WinCE, Windows and WEB.
  18.     Max/MSP: A visual programming language that encapsulates platform-independent code with a platform-specific runtime environment into applications for macOS and Windows.
  19.     MechDome: A cross-platform Android runtime. It allows unmodified Android apps to run natively on iOS and macOS
  20.     MonoCross: An open-source model-view-controller design pattern where the model and controller are shared cross-platform but the view is platform-specific.
  21.     Mono: An open-source cross-platform version of Microsoft .NET (a framework for applications and programming languages)
  22.     MoSync: An open-source SDK for mobile platform app development in the C++ family
  23.     Mozilla application framework: An open source platform for building macOS, Windows and Linux applications
  24.     OpenGL: A cross-platform 3D graphics library.
  25.     PhoneGap: It enables software programmers to build applications for mobile devices using CSS3, HTML5, and JavaScript instead of relying on platform-specific APIs like those in Android, iOS, or Windows Phone.
  26.     PureBasic: A proprietary cross-platform language and IDE for building macOS, Windows and Linux applications
  27.     Qt: An application framework and widget toolkit for Unix-like systems with X11, Microsoft Windows, macOS, and other systems—available under both open source and proprietary licenses.
  28.     Simple and Fast Multimedia Library: A multimedia C++ API that provides low and high level access to graphics, input, audio, etc.
  29.     Simple DirectMedia Layer: An open-source cross-platform multimedia library written in C that creates an abstraction over various platforms’ graphics, sound, and input APIs. It runs on many operating systems including Linux, Windows and macOS and is aimed at games and multimedia applications.
  30.     Smartface: A cross platform native app development tool to create mobile applications for Android and iOS, using WYSIWYG design editor with JavaScript code editor.
  31.     Tcl/Tk
  32.     Ultimate++: A C++ cross-platform rapid application development framework focused on programmers productivity. It includes a set of libraries (GUI, SQL, etc..), and an integrated development environment. It supports Windows and Unix-like OS-s. The U++ competes with popular scripting languages while preserving C/C++ runtime characteristics. It has its own integrated development environment, TheIDE, which features BLITZ-build technology to speedup C++ rebuilds up to 4 times.
  33.     Unity: Another cross-platform SDK which uses Unity Engine.
  34.     Unreal: A cross-platform SDK which uses Unreal Engine.
  35.     V-Play Engine: V-Play is a cross-platform development SDK based on the popular Qt framework. V-Play apps and games are created within Qt Creator.
  36.     WaveMaker: A Cross-platform low-code development tool to create responsive web and hybrid mobile (Android & iOS) applications.
  37.     WinDev: Integrated Development Environment for Windows, Linux, .Net and Java (also with support for Internet and Intranet)
  38.     wxWidgets: An open source widget toolkit that is also an application framework.[14] It runs on Unix-like systems with X11, Microsoft Windows and macOS. It permits applications written to use it to run on all of the systems that it supports, if the application does not use any operating system-specific programming in addition to it.
  39.     Xamrin: With a C#-shared codebase, developers can use Xamarin tools to write native Android, iOS, and Windows apps with native user interfaces and share code across multiple platforms, including Windows and macOS. 
  40.     Xojo: A RAD IDE developed by Xojo, Inc. that uses an object-oriented programming language to create desktop, web and iOS apps. Xojo makes native, compiled desktop apps for macOS, Windows, Linux and Raspberry Pi. It creates compiled web apps that can be run as standalone servers or through CGI. And it recently added the ability to create native iOS apps.

Wednesday, 1 November 2017

HB Blog 147: Explore 50+ Keyboard Applications On Google Play.

People are now expecting variety in all things even in Android apps. Then Why not in keyboard.
Yes, there are more than 50+ keyboard applications on Google Play. You may have never thought to change the keyboard on your Android device. Why would you? The one that came with your phone is almost certainly usable and inoffensive. But it may not be the best keyboard for you.

There’s a whole world of keyboards out there, and your default Google/Samsung/HTC keyboard is nowhere near the most useful, most productive, or the prettiest. The keyboard you choose will depend on what you’re using it for: Are you looking for a keyboard with more keys and options? A simpler more elegant keyboard with fewer keys? All the keys aligned in a straight line at the bottom of your screen? The options are almost limitless.

Once you have a keyboard enabled, you can use it whenever you’re typing in a text box. Your default keyboard will always come up first, but you can quickly switch between keyboards by opening your notification bar menu.
1) SwiftKey Keyboard: - SwiftKey Keyboard uses Artificial Intelligence to automatically learn your writing style, including the emoji you love to use (if you use emoji), the words that matter to you and how you like to type. That means autocorrect and predictive text that actually works because it adapts to you. SwiftKey Keyboard caters for all typing tastes - all colors, designs and themes. Support for 150+ languages. Tapping or swipe-to-type. Tons of emoji (smileys, emoticons).
2) Gboard - the Google Keyboard: - Gboard has everything you love about Google Keyboard-speed and reliability, Glide Typing, voice typing, and more—plus Google Search built in. No more app switching; just search and share, right from your keyboard. Gboard also has emoji search to help you find emoji faster, plus GIF search, and multilingual typing to let you switch languages on the fly.
Glide Typing — Type faster by sliding your finger from letter to letter.
Voice typing — Easily dictate text on the go.
3) GO Keyboard - Emoji keyboard, Swipe input, GIFs: - It`s a emoji keyboard who understands you most-Bored with plain android keyboard. There are 10000+ colorful themes, 1000+emoji and GIFs, 100+ fonts and you can swipe to input smoothly.
4) Hacker's Keyboard: - This keyboard has separate number keys, punctuation in the usual places, and arrow keys. It is based on the AOSP Gingerbread soft keyboard, so it supports multitouch for the modifier keys. This keyboard is especially useful if you use ConnectBot for SSH access. It provides working Tab/Ctrl/Esc keys, and the arrow keys are essential for devices that don't have a trackball or D-Pad.
And, lots more to go on Google Play...
If you want to create you own custom keyboard Android application, my refer next post,  HB Blog 148: Custom Floating Keyboard.

Thursday, 1 June 2017

HB Blog 137: Android "O" Supports New Emoji With Unicode 10 Standard.

Emoji are ideograms and smileys used in electronic messages and Web pages. They are used much like emoticons and exist in various genres, including facial expressions, common objects, places and types of weather, and animals. The first emoji was created in 1999 in Japan by Shigetaka Kurita, who wanted to provide users with a way to communicate through images. Originating on Japanese mobile phones in the late 1990s, emoji have become increasingly popular worldwide since their international inclusion in Apple's iPhone, which was followed by similar adoption by Android and other mobile operating systems.
Apple was looking to expand its market in Japan. People had been using these characters to provide context to their communication, so Apple added a hidden feature in the iOS5 update. Suddenly, yellow faces and poop icons became a part of our lexicon.

Android "O" an upcoming release of the Android mobile operating system, supports new emoji that will be included in the Unicode 10 standard. A new emoji font was also introduced, which notably redesigns its face figures to use a traditional circular shape, as opposed to the "blob" design that was introduced on Android "KitKat".

One Emoji to Rule Them All Before an emoji can become an emoji it must be approved by the Unicode Consortium. Approval process typically takes 1 to 2 years.

Unicode Consortium Submission Process:-
1. Submit a proposal
2. Provide justification for its creation by proving a need.

Argue that the icon is already popular online and frequently searched. • Show that a currently existing family of emoji is missing this pivotal group member. • Prove that there is no other way to express this idea with an existing emoji combination.

Emoji communication problems(With Great Power Comes Great Responsibility) :-
Research has shown that emojis are often misunderstood. In some cases, this is related to how the actual emoji design is interpreted by the viewer, in other cases the emoji that was sent, was not shown in the same way at the receiving side.
The difference between these two problems is, that the first relates to the cultural or contextual interpretation of the smiley. When the author picks a smiley, the author thinks about the smiley in a certain way, but the same smiley may not trigger the same thoughts with the receiver. See also Models of communication.
The second problem is technological. When an author of a message picks a smiley from a list of smiley faces, this smiley is encoded in some way during the transmission, and if the author and the reader do not use the same software or operating system for their devices, the reader's device may visualize the same smiley in a different way.

Small changes to a smiley's look may completely alter its perceived meaning with the receiver.

...Keep Smiling 😊😊😊

Sunday, 1 May 2016

HB Blog 109: Content Assist - The Developer's Friend.

Android Studio and similar other IDE's provide various features to developers which make a comfort environment for them. Hence, it is called as Integrated Development Environment (IDE). More technical, an integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development. One of the most helpful feature is the content assist.

Content/Code assist helps the developer to write code faster and more efficiently. This is achieved by simplifying the task of coding to allow it to focus on the business task being coded. Based on the context of the code, content assist provides the developer with a list of accessible keywords according to a programming language specification, variable, methods, data types.
Autocomplete: - Autocomplete, or word completion, is a feature in which an IDE predicts the rest of a word a user is typing.

For example, in an XML context, when the developer types an opening tag "<" he is offered a list of tags via autocomplete, contextualized following the DTD or XML schema of the document. As the developer types more letters, the offered choices are filtered to only retain the relevant completions. When the developer finally completes the tag, the editor automatically generates the closing tag.

Another example, a developer can just type in the first letter if lowercase and the uppercase letters from a type/variable name then press Ctrl+space to be offered all the choices that match the entered letters that are valid for the current context (class name, interface name, variable or field names).

Code snippet/templates: - Code snippets allow the developer to add a complex coding structure by typing a minimal amount of text. Code snippets can only be used in a valid context (statements snippets are only offered when you can insert statements).

Specifically, in Android Studio ctrl+space (content assist) does 50% work of the developer's work.
Android studio has few more interesting features as well which makes development pretty simple.

Refer below link to meet Android studio,
https://developer.android.com/studio/intro/index.html

Thursday, 22 October 2015

HB Blog 99: How To Integrate Urban Airship - Push Notification In Android And iOS???

Urban Airship is an American mobile technology company. It provides tools and services designed for mobile application developers to easily enhance their applications with audience engagement services, such as push notifications and integrated rich text notifications and in-app pages. Urban Airship primarily provides app developers the ability to easily add features such as creation and delivery of enhanced push notifications and a digital wallet, as well as reporting on the use of those features back to app developers. The company offers these services on Android, iOS, etc.
How to integrate Urban Airship push notification in Android: -

Add the SDK to your project in Android Studio: -
  1. Open your project in Android Studio
  2. Modify your application’s build.gradle script to include the Urban Airship Android Maven repository and dependencies:
  3.  1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    repositories {
        jcenter()
    
        maven {
            url  "http://dl.bintray.com/urbanairship/android"
        }
    }
    
    dependencies {
        // Urban Airship SDK
        compile 'com.urbanairship.android:urbanairship-sdk:6.1.+'
    
        // Recommended for in-app messaging
        compile 'com.android.support:cardview-v7:22.2.0'
    
        // Recommended for location services
        compile 'com.google.android.gms:play-services-location:7.5.0'
    
        // Required for Android (GCM) push notifications
        compile 'com.google.android.gms:play-services-gcm:7.5.0'
    }
    
  4. Sync the project with the gradle file.
Add the following permissions in Android Manifest: -
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
<!-- REQUIRED for Urban Airship -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />  <!-- Required for Push -->

<permission android:name="${applicationId}.permission.UA_DATA" android:protectionLevel="signature" />
<uses-permission android:name="${applicationId}.permission.UA_DATA" />
<!-- The two elements above ensure that only this application has access to the Urban Airship provider -->

<!-- OPTIONAL Urban Airship Settings -->
<!-- REQUIRED FOR LOCATION -->
<!-- Use ACCESS_COARSE_LOCATION if GPS access is not necessary -->
<!-- uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />


Add the following services, provider, receivers, and activities under the application tag: -
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!-- REQUIRED for Action.startActivityForResult -->
<activity android:name="com.urbanairship.actions.ActionActivity" />

<!-- REQUIRED for Urban Airship Push -->
<activity android:name="com.urbanairship.CoreActivity" />

<!-- REQUIRED for Urban Airship Push. The priority is important to be set lower than the
application's push intent receiver in order for the push intent receiver to handle push intents
before the core receiver. This allows the application to launch any activities before Urban
Airship performs any actions or falls back to launching the application launch intent. -->
<receiver android:name="com.urbanairship.CoreReceiver"
          android:exported="false">

    <intent-filter android:priority="-999">
        <action android:name="com.urbanairship.push.OPENED" />
        <category android:name="${applicationId}" />
    </intent-filter>
</receiver>

<!-- REQUIRED for Landing Pages
    - For more customization details, see com.urbanairship.actions.LandingPageActivity -->
<activity
    android:name="com.urbanairship.actions.LandingPageActivity"
    android:exported="false">

    <intent-filter>
        <action android:name="com.urbanairship.actions.SHOW_LANDING_PAGE_INTENT_ACTION" />

        <data android:scheme="http" />
        <data android:scheme="https" />
        <data android:scheme="message" />

        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
</activity>

<!-- REQUIRED for Urban Airship -->
<service android:name="com.urbanairship.push.PushService" android:label="Push Notification Service" />

<!-- Required for analytics -->
<service android:name="com.urbanairship.analytics.EventService" android:label="Event Service" />

<!-- Required for Actions -->
<service android:name="com.urbanairship.actions.ActionService" />

<!-- Required for Rich Push -->
<service android:name="com.urbanairship.richpush.RichPushUpdateService" />

<!-- OPTIONAL for Urban Airship Location (for segments support) -->
<service android:name="com.urbanairship.location.LocationService" android:label="Segments Service" />

<!-- This is required for persisting preferences related to push and location -->
<provider
    android:name="com.urbanairship.UrbanAirshipProvider"
    android:authorities="${applicationId}.urbanairship.provider"
    android:permission="${applicationId}.permission.UA_DATA"
    android:exported="true"
    android:multiprocess="true" />


Create a new airshipconfig.properties file with your application’s settings: -
developmentAppKey = Your Development App Key
developmentAppSecret = Your Development App Secret
productionAppKey = Your Production App Key
productionAppSecret = Your Production Secret
# Toggles between the development and production app credentials
# Before submitting your application to an app store set to true
inProduction = false
# LogLevel is "VERBOSE", "DEBUG", "INFO", "WARN", "ERROR" or "ASSERT"
developmentLogLevel = DEBUG
productionLogLevel = ERROR


Starting Urban Airship Services: -
The Urban Airship SDK requires only a single entry point in the application, known as takeOff. To start, create a class that extends Application and set the name of the class for the application entry in the AndroidManifest.xml:
1
<application android:name=".CustomApplication" ... />

Then, override the application’s onCreate to call UAirship.takeOff:
1
2
3
4
@Override
public void onCreate() {
    UAirship.takeOff(this);
}

This will bootstrap the SDK and look for the settings in airshipconfig.properties. These can also optionally be provided at run time by passing an AirshipConfigOptions in the call to UAirship.takeOff:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
@Override
public void onCreate() {
    AirshipConfigOptions options = new AirshipConfigOptions();
    options.developmentAppKey = "Your Development App Key";
    options.developmentAppSecret = "Your Development App Secret";
    options.productionAppKey = "Your Production App Key";
    options.productionAppSecret = "Your Production App Secret";
    options.inProduction = false;
    UAirship.takeOff(this, options);
}

Enabling User Notifications :-
The Channel ID is a unique identifier that ties together an application/device pair on Android and Amazon devices. The Channel ID is used to target pushes to specific devices using the Urban Airship API. Once a Channel ID is created, it will persist the application until it is either reinstalled, or its internal data is cleared. The Channel ID will be logged for all apps. You can always get the Channel ID with a couple of extra lines to your application.
The Urban Airship SDK makes a distinction between “user notifications”, which can be seen by the user, and other forms of push that allow you to send data to your app silently, or in the background. Enabling or disabling user notifications is a preference often best left up to the user, so by default, user notifications are disabled. For testing purposes, enabling notification at startup requires a few extra lines of code to your main application class.
After UAirship.takeOff, call:
1
2
3
String channelId = UAirship.shared().getPushManager().getChannelId();
Logger.info("My Application Channel ID: " + channelId);
UAirship.shared().getPushManager().setUserNotificationsEnabled(true);

How to integrate Urban Airship push notification in iOS: -
Download and unzip the latest version of libUAirship into the same directory as your project. You should see a new directory, named Airship, containing the latest version of the libUAirship static library and headers, as well as an AirshipKit directory, containing an Xcode project that builds the AirshipKit embedded framework.
Before you begin, make sure both the AirshipKit and Airship directories are in the top level of your app’s source directory.
  1. Include AirshipKit as a project dependency - Drag AirshipKit.xcodeproj out of the AirshipKit folder and into your app project in Xcode (directly under the top level of the project structure). Now AirshipKit will be built at compile-time for the active architecture.
  2. Link against the embedded framework - To link against the embedded framework, add the AirshipKit.framework file to the Embedded Binaries section in the General tab for your target. This should also add it to the Linked Frameworks and Libraries section.
  3. Check Linked Frameworks and Libraries - Make sure AirshipKit.framework shows up in the Linked Frameworks and Libraries section in the General tab for your target.
Create AirshipConfig.plist: -
The Urban Airship SDK uses a .plist configuration file named AirshipConfig.plist to manage your production and development application profiles.
  1.     Create two applications within your Urban Airship account: One for development and one for production.
  2.     Create an AirshipConfig.plist file.
  3.     Set the following values to the ones in your applications
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>inProduction</key>
  <false/>
  <key>developmentAppKey</key>
  <string>Your Development App Key</string>
  <key>developmentAppSecret</key>
  <string>Your Development App Secret</string>
  <key>productionAppKey</key>
  <string>Your Production App Key</string>
  <key>productionAppSecret</key>
  <string>Your Production App Secret</string>
</dict>
</plist>

Starting Urban Airship Services: -
The Urban Airship SDK requires only a single entry point in the app delegate, known as takeOff. Inside your application delegate’s application:didFinishLaunchingWithOptions: method, initialize a shared UAirship instance by calling [UAirship takeOff]. This will bootstrap the SDK and look for settings specified in the AirshipConfig.plist file you created earlier.

Import the Required Header Files: -
1
2
3
4
5
#import "UAirship.h"
#import "UAConfig.h"
#import "UAPush.h"
#import <AirshipKit/AirshipKit.h>
@import AirshipKit;

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Populate AirshipConfig.plist with your app's info from https://go.urbanairship.com
    // or set runtime properties here.
    UAConfig *config = [UAConfig defaultConfig];
    // You can also programmatically override the plist values:
    // config.developmentAppKey = @"YourKey";
    // etc.
    // Call takeOff (which creates the UAirship singleton)
    [UAirship takeOff:config];
}
//Retrieving your Channel ID
//The Channel ID is a unique identifier that ties together an application/device pair on iOS devices. The Channel ID is used to target pushes to specific devices using the Urban Airship API.
NSString *channelId = [UAirship push].channelID;
NSLog(@"My Application Channel ID: %@", channelId);

    

Enabling User Notifications:-
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
// Set the notification types required for the app (optional). This value defaults
// to badge, alert and sound, so it's only necessary to set it if you want
// to add or remove types.
[UAirship push].userNotificationTypes = (UIUserNotificationTypeAlert |
                                         UIUserNotificationTypeBadge |
                                         UIUserNotificationTypeSound);

//To enable user notifications programmatically
// User notifications will not be enabled until userPushNotificationsEnabled is
// set YES on UAPush. Once enabled, the setting will be persisted and the user
// will be prompted to allow notifications. Normally, you should wait for a more appropriate
// time to enable push to increase the likelihood that the user will accept
// notifications.
[UAirship push].userPushNotificationsEnabled = YES;

Sunday, 11 October 2015

HB Blog 97: Jailbreaking Using Pangu - A Jailbreak Utility.

Jailbreaking is a form of privilege escalation, and the term has been used to describe privilege escalation on devices by other manufacturers as well. It is the process of removing hardware restrictions on iPhone, it through the use of software and hardware exploits. It permits root access to the iOS file system and manager, allowing the download of additional applications, extensions, and themes that are unavailable through official package.
Reasons for jailbreaking: -
  1. Device customization
  2. Use of handset on multiple carriers
  3. Installation of malware(Hacking tools)
  4. and many more
Steps to Jailbreak an iPhone: -
  1. Download a free jailbreak utility released by the Pangu jailbreak developers.
  2. Connect your iPhone to your computer using the USB cable. Tap "Trust" on your iPhone if prompted. This will appear if you are connecting your iPhone for the first time.
  3. You will need to make a backup in iTunes and check to ensure that you are running the latest version. This will allow you to restore your settings after jailbreaking.
  4.  Start Pangu on your computer and connected iPhone will be displayed in the Pangu window.
  5. Click "Jailbreak" in the Pangu window and the jailbreaking process will begin.
  6. This could take up to 20 minutes or more. Do not touch your iPhone or unplug it during the jailbreak process. Your iPhone will reboot after the jailbreak is complete. The reboot will take longer than normal, so don't be alarmed.
  7. Launch Cydia which is the package manager for jailbroken iPhones. You will need to run it as soon as the jailbreak is complete to finish setting up your filesystem. Your iPhone will reboot again after configuring Cydia.
  8. Launch Cydia again and tap the "Changes" tab.
  9. Now that your device is fully jailbroken, you can restore your backup to retrieve your settings and data without losing your jailbreak.
Comparison iPhone jailbreaking to Android rooting:-
Jailbreaking of iOS devices is sometimes compared to "rooting" of Android devices. Although the two concepts both involve privilege escalation, they differ substantially in scope. Android devices, with few exceptions, do not natively implement strong technical security measures to prevent users from modifying or replacing the operating system, enabling installation of apps that have not been reviewed or authorized by a central authority such as Google - known as "sideloading" - is a simple user preference.

Sunday, 13 September 2015

HB Blog 94: MoPub - Mobile Ad Server Integration In Android And iOS.

MoPub is a hosted ad serving solution built specifically for mobile publishers. It helps to grow your mobile advertising business with powerful ad management. etc.
In this post, I will show how to integrate MoPub ads in Android as well as iOS.
For Android,
Here are the basic integration steps: -
  1.     Check out the files from our repository.
  2.     Add our SDK (and dependencies) to your project.
  3.     Create ad units in your app.
Download the MoPub Android SDK: -
The MoPub SDK is distributed as source code that you must include in your application.
MoPub Android Full SDK.zip
Includes everything you need to serve HTML and MRAID MoPub advertisements and built-in support for the Millennial Media ad network - including the required third party binaries.

Using Gradle: -
Open your project's settings.gradle file and make sure the MoPub SDK is included as a module:
include ':app', ':mopub-sdk'
Open your project's build.gradle file and add jcenter as a repository and the MoPub SDK as a dependency:
repositories {
    jcenter()
}
...
dependencies {
    compile project(':mopub-sdk')
...
}

This is required in order to resolve the MoPub SDK's compile time dependency on com.mopub.volley:mopub-volley:1.1.0.
Follow the instructions on the Android Developer Site for setting up Google Play Services. It is always recommend to use the latest version of Google Play Services. 

Load banner ads in your app: -
1. Check your AndroidManifest.xml file.
Add following permissions,
1
2
3
4
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
You’ll also need to include the following custom Activities (even though you won’t instantiate them directly):
1
2
3
4
<activity android:name="com.mopub.mobileads.MoPubActivity" android:configChanges="keyboardHidden|orientation|screenSize"/>
<activity android:name="com.mopub.mobileads.MraidActivity" android:configChanges="keyboardHidden|orientation|screenSize"/>
<activity android:name="com.mopub.common.MoPubBrowser" android:configChanges="keyboardHidden|orientation|screenSize"/>
<activity android:name="com.mopub.mobileads.MraidVideoPlayerActivity" android:configChanges="keyboardHidden|orientation|screenSize"/>
2. Define a slot for your banner ad in your layout XML.
The MoPub SDK provides a custom View subclass, MoPubView, that handles requesting and loading ads.
Include this XML block to your Activity’s or Fragment’s layout.
1
2
3
4
<com.mopub.mobileads.MoPubView
    android:id="@+id/adview"
    android:layout_width="fill_parent"
    android:layout_height="50dp"/>
3. Load an ad into the banner slot.
In your Activity or Fragment code, declare an instance variable for your MoPubView:
private MoPubView moPubView;
You should already have created an ad unit on MoPub’s site and received an Ad Unit ID. You’ll use it now to identify that ad unit in your app and request ads from MoPub that are relevant for your users.
In your Activity’s onCreate() or your Fragment’s onCreateView() method, set your MoPubView’s Ad Unit ID, then simply call loadAd() to fetch and display the ad:
1
2
3
4
5
...
moPubView = (MoPubView) findViewById(R.id.adview);
moPubView.setAdUnitId("xxxxxxxxxxx"); // Enter your Ad Unit ID from www.mopub.com
moPubView.loadAd();
...
When the hosting Activity or Fragment is destroyed, be sure to also destroy the MoPubView by calling:
1
moPubView.destroy();

Additional Listener Interface: - MoPubView provides a listener interface, BannerAdListener, which you can use to stay informed about ad lifecycle events. 
BannerAdListener includes the following methods:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
// Sent when the banner has successfully retrieved an ad.
public void onBannerLoaded(MoPubView banner);
// Sent when the banner has failed to retrieve an ad. You can use the MoPubErrorCode value to diagnose the cause of failure.
public void onBannerFailed(MoPubView banner, MoPubErrorCode errorCode);
// Sent when the user has tapped on the banner.
public void onBannerClicked(MoPubView banner);
// Sent when the banner has just taken over the screen.
public void onBannerExpanded(MoPubView banner);
// Sent when an expanded banner has collapsed back to its original size.
public void onBannerCollapsed(MoPubView banner);

For iOS,
Here are the basic integration steps: -
  1.     Download the MoPub SDK
  2.     Add the SDK to your Xcode project.
  3.     Create and use a Banner or Interstitial ad.
Download the MoPub iOS SDK: -
The MoPub SDK is distributed as source code that you must include in your application.
MoPub Full SDK.zip
Includes everything you need to serve HTML and MRAID MoPub advertisiments and built-in support for three major third party ad networks - iAd, Google AdMob, and Millennial Media - including the required third party binaries.

Using CocoaPods: -
The MoPub SDK is available through Cocoapods, a popular dependency management system for Objective-C projects.
To download and incorporate the MoPub SDK into your project using Cocoapods, add the following line to your project's podfile:
pod 'mopub-ios-sdk'
After running pod install (if you’re setting up Cocoapods for the first time) or pod update (if you’re adding MoPub to an existing Cocoapods project), your project will be ready to use the base MoPub SDK.

Load banner ads in your app: -
You can create an ad unit (a space for ads) on the MoPub online dashboard. Upon your first visit, you'll be prompted to register your application and set up an ad unit. Afterwards, you can retrieve your ad unit ID by clicking "Get code snippet" in the top right corner of the ad unit page.
Adding a banner to your application takes only a few, easy steps:
  1.     In your view controller's header file: Import the MPAdView.h header file and declare an MPAdView *adView property. Declare that your view controller implements the MPAdViewDelegate protocol.
  2.     In your view controller's implementation file, instantiate an MPAdView, passing in your ad unit ID. This is typically done in -viewDidLoad.
  3.     Register your view controller as the adView's delegate.
  4.     Set the adView's frame and add the adView to your controller's view hierarchy.
  5.     Center the adViewon screen to account for iPhone 6 and iPhone 6 plus
  6.     Implement the -viewControllerForPresentingModalView MPAdViewDelegate method. The adView will use the view controller returned by this method to present modals when tapped. Typically your controller can simply return self.
  7.     Finally, load an ad by sending adView the -loadAd message.
// MyViewController.h
1
2
3
4
5
#import "MPAdView.h"

@interface MyViewController : UIViewController <MPAdViewDelegate>
@property (nonatomic) MPAdView *adView;
@end

// MyViewController.m
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#import "MyViewController.h"

@implementation MyViewController

- (void)viewDidLoad {
    // ... your other -viewDidLoad code ...

    self.adView = [[MPAdView alloc] initWithAdUnitId:@"<YOUR_ADUNIT_ID_HERE>"
                                                 size:MOPUB_BANNER_SIZE];
    self.adView.delegate = self;
    self.adView.frame = CGRectMake((self.view.bounds.size.width - MOPUB_BANNER_SIZE.width) / 2, 
                                  self.view.bounds.size.height - MOPUB_BANNER_SIZE.height,
                                  MOPUB_BANNER_SIZE.width, MOPUB_BANNER_SIZE.height);
    [self.view addSubview:self.adView];
    [self.adView loadAd];
    [super viewDidLoad];
}

#pragma mark - <MPAdViewDelegate>
- (UIViewController *)viewControllerForPresentingModalView {
    return self;
}

...
@end

Additional Delegate Callbacks: -
MPAdViewDelegate includes a variety of optional callbacks you can use to be notified of events, e.g. when an ad has successfully loaded, or when the ad is about to present or dismiss a modal view. Check out the MPAdViewDelegate protocol in MPAdview.h for a list of these methods.
1
2
 // Called when the banner has successfully retrieved an ad.
-adViewDidLoadAd: