How to Open Source Code in Mobile

Many companies have tried to open source their code in mobile, but many of them failed, some even during the first release. Would you like to know what are the common mistakes that other companies made when trying to open source their code? And most important, would you like to know what are the right ways to do it?

Want to get started with mobile open-source code? This document will help you completely open source your applications for Android and iOS. It goes in-depth on how to use Git, the core tool we feel every developer should know. In this guide, you will learn how to open source your application code while having all your changes be merged back into our main repositories, making your pull requests automatically accepted by our testing servers. This is especially great if you plan on working with a team of developers or having a few apps in mind that you want to always have up-to-date

Google Chrome

To view the source code of a web page in Google Chrome, use any of the following methods.

View source code only

Method one

To view only the source code, press Ctrl+U on your computer’s keyboard.

Method two

Right-click a blank part of the web page and select View page source from the pop-up menu that appears.

View page source in Chrome.

View page source with elements

  1. Open Chrome and navigate the web page whose source code you’d like to view.
  2. Click the Customize and control Google Chrome Chrome settings icon icon in the upper-right corner of the browser window.
  3. From the drop-down menu that appears, select More tools, then select Developer tools.
  4. Click the Elements tab in the top-left corner of the new section that appears at the bottom of the screen.
Elements tab in Chrome.

Tip

In Chrome, pressing F12 or Ctrl+Shift+I also brings up the interactive developer tool. This tool provides much more interaction with the source code and CSS settings, allowing users to see how changes in the code affect the web page immediately.

Steps to view source code

  1. Visit the website which you want to view it’s source code.
  2. Click inside the address bar and append view-source: before the url of the website.
  3. Click the send button and the page will load with the source code of the file.

Mozilla Firefox

To view the source code of a web page in Mozilla Firefox, use any of the following methods.

View source code only

Method one

To view only the source code, press Ctrl+U on your computer’s keyboard.

Method two

Right-click a blank part of the web page and select View Page Source from the pop-up menu that appears.

View page source in Firefox.

View page source with elements

  1. Open Firefox and navigate the web page whose source code you’d like to view.
  2. Click the Menu Firefox Menu Icon icon in the top-right corner of the screen.
  3. Select Web Developer in the drop-down menu, then select Toggle Tools from the expanded menu.
  4. Click the Inspector tab in the top-left corner of the section that appears at the bottom of the screen.
Firefox Inspector tab.

Tip

In Firefox, pressing F12 or Ctrl+Shift+I also brings up the interactive developer tool. This tool provides interaction with the source code and CSS settings, allowing users to see how changes in the code affect the web page in real time.

Android Open Source Project

Android is an open source operating system for mobile devices and a corresponding open source project led by Google. This site and the Android Open Source Project (AOSP) repository offer the information and source code needed to create custom variants of the Android OS, port devices and accessories to the Android platform, and ensure devices meet the compatibility requirements that keep the Android ecosystem a healthy and stable environment for millions of users.

As an open source project, Android’s goal is to avoid any central point of failure in which one industry player can restrict or control the innovations of any other player. To that end, Android is a full, production-quality operating system for consumer products, complete with customizable source code that can be ported to nearly any device and public documentation that is available to everyone (in English.

Microsoft Edge

To view the source code of a web page in Microsoft Edge, use any of the following methods.

View source code only

Method one

To view only the source code, press Ctrl+U on your computer’s keyboard.

Method two

Right-click a blank part of the web page and select View page source from the pop-up menu that appears.

View page source selector in Edge.

View page source with elements

  1. Open Microsoft Edge and navigate the web page whose source code you’d like to view.
  2. Click the Settings and more Edge more icon icon in the upper-right corner of the screen.
  3. Move your mouse over More tools in the drop-down menu, and select Developer tools from the expanded menu.
  4. Click the Elements tab at the top of the window that appears on the right side of the screen.
Elements tab in Edge.

Tip

In Microsoft Edge, pressing F12 or Ctrl+Shift+I also brings up the interactive developer tool. This tool provides interaction with the source code and CSS settings, allowing users to see how changes in the code affect the web page in real time.

Microsoft 

Steps To View Source Code

  1. Visit the website which you want to view it’s source code.
    A screenshot of Google's homepage
  2. Click inside the address bar and append view-source: before the url of the website.
    view source being highlighted
  3. Click the send button and the page will load with the source code of the file.
    Google's website

Microsoft Internet Explorer

To view the source code of a web page in Microsoft Internet Explorer, use any of the following methods.

View source code only

Method one

To view only the source code, press Ctrl+U on your computer’s keyboard.

Method two

Right-click a blank part of the web page and select View source from the pop-up menu that appears.

View source selector in Internet Explorer.

View page source with elements

  1. Open Internet Explorer and navigate the web page whose source code you’d like to view.
  2. Click Tools Internet explorer tools icon in the upper-right corner.
  3. Select F12 Developer Tools from the drop-down menu.
  4. Click the DOM Explorer tab at the top-left corner of the developer tools menu.
DOM Explorer tab in Internet Explorer.

Tip

In Internet Explorer, pressing F12 brings up the DOM tool. This tool provides interaction with the source code and CSS settings, allowing users to see how changes in the code affect the web page immediately.

Conclusion

This guide was created to help you make open source contributions easier as we want more developers write better apps for Android users. The code samples in this document can be directly copied and pasted into your existing Android apps.

0 Comments

No Comment.