Skip to content

An opensrouce library to incorporate/start Qibla Direction Activity in your native android application.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE
MIT
LICENSE.txt
Notifications You must be signed in to change notification settings

hassaanjamil/hj-qibla-compass

Repository files navigation

hjQiblaCompass

An open source Android (Java) Native Library to incorporate/start Android Qibla Direction Activity in your Native Android Applcation.

Configurations

Dependency

implementation 'com.hassanjamil:qibla:0.2.2'

Root Level build.gradle

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        google()
        maven { url "http://api.tplmaps.com:8081/artifactory/example-repo-local/" }
    }
}

AndroidManifest.xml

<activity
	android:name="com.hassanjamil.hqibla.CompassActivity"
	android:label="@string/app_name"
	android:screenOrientation="portrait"/>

Sample Code

Intent intent = new Intent(MainActivity.this, CompassActivity.class);
intent.putExtra(Constants.TOOLBAR_TITLE, "My App");		// Toolbar Title
intent.putExtra(Constants.TOOLBAR_BG_COLOR, "#FFFFFF");		// Toolbar Background color
intent.putExtra(Constants.TOOLBAR_TITLE_COLOR, "#000000");	// Toolbar Title color
intent.putExtra(Constants.COMPASS_BG_COLOR, "#FFFFFF");		// Compass background color
intent.putExtra(Constants.ANGLE_TEXT_COLOR, "#000000");		// Angle Text color
intent.putExtra(Constants.DRAWABLE_DIAL, R.drawable.dial);	// Your dial drawable resource
intent.putExtra(Constants.DRAWABLE_QIBLA, R.drawable.qibla); 	// Your qibla indicator drawable resource
intent.putExtra(Constants.FOOTER_IMAGE_VISIBLE, View.VISIBLE|View.INVISIBLE|View.GONE);	// Footer World Image visibility
intent.putExtra(Constants.LOCATION_TEXT_VISIBLE, View.VISIBLE|View.INVISIBLE|View.GONE); // Location Text visibility
startActivity(intent);

Screenshot

Contributor

Muhammad Hassan Jamil
Team Lead Android Development
hassanjamil91@gmail.com

Please contirbute to help in improvin' it.

Reference

This code is based on https://github.com/iutinvg/compass/

About

An opensrouce library to incorporate/start Qibla Direction Activity in your native android application.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE
MIT
LICENSE.txt

Stars

Watchers

Forks

Packages

No packages published