droid-migrate | Android SQLite Migrations | Database library

 by   aglover Java Version: Current License: No License

kandi X-RAY | droid-migrate Summary

kandi X-RAY | droid-migrate Summary

droid-migrate is a Java library typically used in Database applications. droid-migrate has no bugs, it has no vulnerabilities and it has low support. However droid-migrate build file is not available. You can download it from GitHub.

Rails migrations are beautiful. Progressive database changes are nicely encapsulated in migrations, which can be applied for both upgrades and rollbacks. When I started working on an Android app that made use of SQLite, I found myself wishing for the same facility. Android does come with a helper class, android.database.sqlite.SQLiteOpenHelper, that facilitates database migrations somewhat and this framework makes use of it. In essence, the SQLiteOpenHelper class keys off of a database version and will run a corresponding onCreate, onUpgrade, or onDowngrade method depending on what version number an instance is initialized with. What those methods do and what version number is used is left entirely up to you, the app developer. That's where Droid Migrate comes in -- this project manages version numbers and the migrations associated with them. Each migration can have a up and down method associated with it. You then plug in the appropriate SQL. Droid Migrate handles upgrades and rollbacks like Rails migrations. Droid Migrate also provides you with a handy facade, dubbed DatabaseHelper from which you should obtain database connections (for doing things like displaying data, writing to SQLite, etc). This class is the core behind any migration that'll take place for your app. If you've ever worked with Rails migrations, then you'll be right at home. If Rails migrations are new you to, but you've managed to deal with app SQLite upgrades and rollbacks, then you'll find this framework quite useful. #How to get started. ##Step 1: Set up PATH. Clone this repository (or download the zip file). Fire up a terminal and run ant dist. This will run some tests and ultimately build a few jar files. One jar file contains the bare minimum classes you'll need in an Android project (it's 4KB in size and Droid Migrate will automatically place it into your project's libs directory). The other jar file has code required for generating migrations and is not indented to be bundled with your app. Once you've done that, you'll need to do two things: create a new environment variable dubbed DROID_MIGRATE_HOME and update your PATH. DROID_MIGRATE_HOME should be set to where you cloned (or unzipped) this project. Update your PATH to include DROID_MIGRATE_HOME\bin. ##Step 2: Create an initial migration. Next, open a terminal in the root of a desired Android project. Droid Migrate will create a number of assets for you depending on what command you issue.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              droid-migrate has a low active ecosystem.
              It has 30 star(s) with 7 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 0 open issues and 1 have been closed. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of droid-migrate is current.

            kandi-Quality Quality

              droid-migrate has 0 bugs and 0 code smells.

            kandi-Security Security

              droid-migrate has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              droid-migrate code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              droid-migrate does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              droid-migrate releases are not available. You will need to build from source code and install.
              droid-migrate has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed droid-migrate and discovered the below as its top functions. This is intended to give you an instant insight into droid-migrate implemented functionality, and help decide if they suit your requirements.
            • Command line parser
            • Generate a string with the specified parameters
            • Generate a string with the specified sequence number and sequence number
            • Generates the HTML for the specified package
            • On create
            • Get the migration for the package and class
            • Perform the initial migration
            • Upgrades the database version
            • On downgrade
            • Downgrade database version
            • Handle down migration
            • Executes the specified SQL
            Get all kandi verified functions for this library.

            droid-migrate Key Features

            No Key Features are available at this moment for droid-migrate.

            droid-migrate Examples and Code Snippets

            No Code Snippets are available at this moment for droid-migrate.

            Community Discussions

            QUESTION

            Azure Notification Hubs still reliant on GCM with 6 months to switch-off
            Asked 2020-Jan-08 at 18:14

            Google have deprecated GCM for delivering push notifications to Android apps, in favour of FCM. GCM will be switched off on April 11 2019 (See header here: https://developers.google.com/cloud-messaging/android/android-migrate-fcm)

            Microsoft have provided a tutorial for setting up a new app with Azure Notification Hubs using FCM, however it still depends on the underlying GCM library (com.google.android.gms:play-services-gcm:12.0.0):

            https://docs.microsoft.com/en-us/azure/notification-hubs/notification-hubs-android-push-notification-google-fcm-get-started

            With just 6 months until GCM switch off, my questions are therefore:

            • Will Azure Notification Hubs Android SDK be updated to remove the dependency on com.google.android.gms:play-services-gcm:11.8.0?

            • Will a GCM to FCM migration guide be written for existing apps using Azure Notification Hubs on Android?

            • Currently the Android Azure Notification Hubs SDK relies on a deprecated net.http.AndroidHttpClient, which has been totally removed in Android Pie. When will this be fixed?

            • What server side changes, if any, will be required to migrate from GCM to FCM when using Azure Notification Hubs?

            ...

            ANSWER

            Answered 2020-Jan-08 at 18:14

            The Azure Notification Hubs team updated the SDK to address the issues you identified and also published this blog post describing the state of the GCM/FCM world as it relates to Azure Notification Hubs: https://azure.microsoft.com/en-ca/blog/azure-notification-hubs-and-google-s-firebase-cloud-messaging-migration/ to address customer concerns.

            No server-side changes needed.

            Source https://stackoverflow.com/questions/52628028

            QUESTION

            Migrate from gcm to fcm in the server
            Asked 2019-Jun-12 at 09:52

            in this article (https://developers.google.com/cloud-messaging/android/android-migrate-fcm#update-server-endpoints) it says that for migrating from gcm to fcm all you need to do in the server is change the endpoint.

            but how do i do this?

            currently i'm using gcm client library for Java. what exactly do i need to do? i couldn't find anywhere instruction how to update the endpoint.

            do i need to stop using the gcm client library and move to the fcm client library?

            ...

            ANSWER

            Answered 2018-Jul-23 at 12:00

            There is no FCM client library. It is actually supported by the one you already use.

            You can specify to which endpoint a message should be sent in the constructor for Sender.

            Source https://stackoverflow.com/questions/51477224

            QUESTION

            Not Registered error on server, FCM messages not received on Android
            Asked 2019-Mar-21 at 16:01

            I went through all the "Not Registered" error posts and could not solve the problem. I also contacted firebase support, unfortunately I only received URLs to the official documentation from them.

            Our app has been in the store for a while and was using GCM successfully for notifications when the app is in the background. Due to deprecation of GCM we are currently trying to migrate to FCM.

            Summarised: We went through the official migration steps, changed the code in the android client, updated firebase console, downloaded/added google-services.json and also adapted the endpoint URL on the app server.

            Now the problem we are facing is as follows: The app requests a token using FirebaseInstanceId singleton and receives it successfully. This token we then forward to our app server that saves it in a DB. Then, the server wants to send the android device a message using the Sender.sender(...) method but receives the infamous 'NotRegistered' error. All of this happens within about 10 seconds.

            We tried our luck on these devices:

            • Emulator device Nexus 5X API 27 x86
            • Nexus 5X API 23
            • Pixel 2 API 28

            Looking at the list of reasons the NotRegistered error is returned, I can comment as follows:

            1. Client app unregisters with FCM -> since we are in control of the phone I can exclude this point
            2. Uninstallation of app -> same here
            3. Registration token expires -> possible, but within 10 seconds?
            4. "If the client app is updated but the new version is not configured to receive messages" -> what does that exactly mean? Since the app was able to receive messages before, I guess it is configured to receive them.

            Android Client

            AndroidManifest.xml

            ...

            ANSWER

            Answered 2019-Mar-21 at 16:01

            So this one wasn't obvious... I've been banging my head against the wall for 3 days, and this post took me onto the right path. The following line in the manifest was the problematic piece:

            Source https://stackoverflow.com/questions/55183093

            QUESTION

            revoke GCM Server Key after migration to FCM
            Asked 2019-Jan-08 at 20:39

            I'm planning my project's migration from GCM to FCM.

            An experienced FCM person says:

            ... after importing the project to Firebase, it would generate its own Server Key that you could use [in FCM legacy API calls to push to devices with GCM-generated tokens and FCM-generated tokens]

            With this new Firebase Server Key I would no longer need the old GCM Server Key. Because the old GCM key won't be necessary I'd like to revoke it to limit possible attacks. Is it possible to revoke all old GCM Server Keys for a project after migrating the project to FCM?

            ...

            ANSWER

            Answered 2019-Jan-08 at 20:16

            It's possible. GCM Projects were provided Server Keys that are accessible via the Google Developer's Console (make sure you select the correct project).

            From the screenshot above, you could see Server key (auto created by Google Service). The option to delete the API Key can also be seen here -- the trash icon is beside the copy icon.

            If you already imported the project to Firebase, navigating to the Cloud Messaging tab would also show the old Server Key, aka the Legacy Server Key.

            Choosing to delete the default Server API Key will show the following prompt:

            This credential will be deleted immediately and permanently. Once deleted, it can no longer be used to make API requests.

            Do you want to delete the credential?

            Proceeding to delete the key, then refreshing both pages afterwards, would show a new auto created Server Key.

            Source https://stackoverflow.com/questions/54046476

            QUESTION

            Server api key: migration doc vs migration video
            Asked 2019-Jan-03 at 10:26

            The only change that the GCM -> FCM migration doc requires is changing the endpoint:

            Update your server code to use new FCM endpoints for sending messages via HTTP and XMPP... Optionally, you may want to evaluate the FCM HTTP v1 API, which offers an improved security model and new capabilities for customizing messages across

            But the video seems to tell a different story:

            I'll need to update to a new more secure server key which I can get from the firebase console... download the service account credentials then I'll drag the JSON file into my project... replace the GCM API key with this service account key I'll update my HTTP header to use this access token...

            Can we continue to use the GCM server api key when sending requests to the new FCM endpoint or do we "need to update to a more secure server key" obtained from the FCM console?

            ...

            ANSWER

            Answered 2019-Jan-03 at 10:26

            The GCM documentation you pointed out is kinda (not that much) old. It shows what needs to change when migrating from GCM to FCM Legacy. What Jen Person showed in the video is when you are to use FCM v1 (see the uri on 8:19).

            Can we continue to use the GCM server api key when sending requests to the new FCM endpoint or do we "need to update to a more secure server key" obtained from the FCM console?

            From my comment here (with minor updates):

            Depending on which type of GCM API Key you were using (if this is a reeeaally old project, you might still be using a different type of Key), it may not work. Regardless, after you import your GCM project to Firebase, it would probably generate the necessary API Keys (Server Key for this matter) that you could (and should) use in order for FCM to work.

            Source https://stackoverflow.com/questions/53926285

            QUESTION

            PeriodicTask and OneoffTask after migration from GCM to FCM
            Asked 2018-Apr-17 at 20:40

            Question

            What should I use in place of PeriodicTask and OneOffTask when migrating from GCM to FCM? Is there any equivalent in FCM packages?

            Background

            Recently Google has deprecated GCM and they provided migration guide, but I couldn't find any informations there about migrating PeriodicTasks and OneOffTasks.

            The tutorial says to replace play-services-gcm with firebase-messaging but I couldn't find anything similar to the tasks inside this package, so I wonder if they completely resigned from them or if actually we can keep on using PeriodicTask/OneOffTasks?

            ...

            ANSWER

            Answered 2018-Apr-17 at 20:40

            The PeriodicTask and OneoffTask classes (part of the GcmNetworkManager component) can be replaced with the Firebase Job Dispatcher, which is an open source library for scheduling units of work that will be executed in your app's process. The service-side API it exposes mirrors the framework's JobScheduler API, which is slightly different from the GcmNetworkManager. Upgrading should be a fairly easy, mechanical change.

            Upgrade steps

            Add the following to your build.gradle's dependencies section:

            Source https://stackoverflow.com/questions/49797085

            QUESTION

            How to convert a GCM Intent Service to Firebase
            Asked 2017-Mar-06 at 04:42

            I'm migrating an old app from GCM to FCM and I have converted most things but I get to this service and I'm at a little bit of a loss to how I should proceed--I'm finding nothing in the migration documentation (https://developers.google.com/cloud-messaging/android/android-migrate-fcm) I see that I'd probably need to change the manifest entry as well ().

            Here's the old service:

            ...

            ANSWER

            Answered 2017-Mar-06 at 04:42

            It looks like you're using a really old implementation of GCM. GCMBaseIntentService has been deprecated even before FCM was released and was replaced with GcmListenerService.

            The one shown in the GCM-FCM migration is in line with the more recent version of GCM (using GcmListenerService). You'll have to use FirebaseMessagingService for FCM now.

            Source https://stackoverflow.com/questions/42589465

            QUESTION

            When we upgrade from GCMRegistrar to FirebaseMessaging, do we need to do any server side changes?
            Asked 2017-Jan-25 at 13:01

            We are planning on upgrading from GCMRegistrar to FirebaseMessaging and I need to verify that we do not need to do any changes to our server side implementation.

            On the bottom of this page https://developers.google.com/cloud-messaging/android/android-migrate-fcm one can read that there should not be any changes required.

            But two questions:

            1. When we enable Firebase messaging, will the Authorization:key and the "sender id" be the same as the ones that we had in the Google API console for GCM?
            2. Is there anything else we must consider on server side?

            Many thanks Ola

            ...

            ANSWER

            Answered 2017-Jan-25 at 13:01

            This statement from GCM and FCM Frequently Asked Questions may alleviate your concerns:

            How is FCM server implementation different from GCM server implementation?

            You won’t need to make any server-side protocol changes for the upgrade. The service protocol has not changed. However, note that all new server enhancements will be documented in FCM server documentation.

            Source https://stackoverflow.com/questions/41829361

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install droid-migrate

            You can download it from GitHub.
            You can use droid-migrate like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the droid-migrate component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/aglover/droid-migrate.git

          • CLI

            gh repo clone aglover/droid-migrate

          • sshUrl

            git@github.com:aglover/droid-migrate.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link