Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 71025 articles
Browse latest View live

Can't get links to load in Web View?!?

$
0
0

@cmki wrote:

So, WAY back in the day with ionic (and Cordova), if you just put a link on a page and didn't have the "InAppBrowser" plugin installed, the clicked links would take over the whole app screen, this was largely considered a pain in the butt. Fast forward to today when I actually need a link to open in the FULL web view, and it appears that the fix for this has been put back in place, and I can no longer just put a link there without the plugin.

Anyone know how I can make that work?

So here's the deal: I have a client that wants a "mobile app" even though their site is already mobile ready. I wanted to do an experiment that basically just uses Ionic/Cordova to init the app (Android primarily), load the Ionic splash screen, then just redirect the user to the website, but keep it in the App Web View, so it looks like they are in the app, not the web site. I'll later add in some net checks, etc, but not right now.

Any thoughts?

Posts: 1

Participants: 1

Read full topic


Fabric.io w/ Crashlytics Setup

$
0
0

@EffakT wrote:

So, Fabric.io is a great tool, although they don't have much setup information for Ionic/Cordova.

First off, follow what they say... installing the IDE plugin, etc.
Now. Ionic uses gradle for its building. You would expect the install to work right away, but it wont. Ionic/Cordova overwrites the build.gradle definitions in the dependencies section.

Anyway, first off open build.gradle, and in buildscript > repositories, if its not already in there, add
jcenter()
maven { url 'https://maven.fabric.io/public' }

Next, there are 3 dependencies for each gradle version. if you know what version you are running, great. otherwise add the following to all of them.
classpath 'io.fabric.tools:gradle:1.+'

Now what we need to do is extend gradle's build.
Create a file in your android/ios directory called build-extras.gradle.
Inside this, we need to define the repositories.
apply plugin: 'io.fabric'
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
// Crashlytics Kit
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true
}
}

Now, when you run or build the app, it should work.
This is as far as I have gotten in the install, however the fabric.io does not want to recognize the app.

If anyone has had any luck getting further, let me know please.

Posts: 1

Participants: 1

Read full topic

Downloading files in Ionic 2 using cordova-plugin-file-transfer

$
0
0

@dsgriffin wrote:

I have files (located inside the www/ folder) that I want the user to be able to download locally to their iOS/Android device.

I'm attempting to use the download method of the cordova-plugin-file-transfer, but as Ionic 2 is so new (and I'm v. new to Ionic/Angular in general) I'm unable to discover the correct paths etc.

I've managed to get it like so:

downloadFile(file) {
  this.platform.ready().then(() => {
    const fileTransfer = new FileTransfer();

    const pdfLocation = `${cordova.file.applicationDirectory}www/${file}`;
    const targetPath = cordova.file.documentsDirectory + "file.txt";

    fileTransfer.download(file, targetPath,
        (result) => {
            console.log("success");
        },
        (error) => {
            console.log("error");
        }
    );
  });
}

But I receive the "error" message each time - am I using the correct folders/approach for this?

Posts: 1

Participants: 1

Read full topic

Issues with alpha53

$
0
0

@icarus_31 wrote:

Hi,

I have some issues with alpha53

1 Label/Input

    <ion-item>
      <ion-label floating>Test</ion-label>
      <ion-input type="text" [(ngModel)]="_siteName"></ion-input>
    </ion-item>

The input is a standard rectangle. What am I doing wrong?

2 item-right

<button ion-item *ngFor="#menu of _menus" (click)="menuSelected(menu)">
  <ion-icon [name]="menu.icon" item-left></ion-icon>
  {{ menu.name }}
  <span item-right>
    <button clear>{{ menu.quantity }}</button>
  </span>
</button>

The button does not go to the right of the main button. It is just beside the menu.item. Suggestion?

3 ion-radio

After I changed the way the ion-radio have to work, it does not show the check mark anymore. Was ok with alpha52

  <form [ngFormModel]="_orderByForm">
    <ion-list radio-group ngControl="orderBy">
      <ion-item>
        <ion-label>Item 1</ion-label>
        <ion-radio value="item1" [checked]="_orderBy=='item1'"></ion-radio>
      </ion-item>
      <ion-item>
        <ion-label>Item 2</ion-label>
        <ion-radio value="item2" [checked]="_orderBy=='item2'"></ion-radio>
     </ion-item>
   </ion-list>
  </form>

Thanks

Posts: 1

Participants: 1

Read full topic

Ionic swipe pages

Basic ion-nav-view example

$
0
0

@eslazyk wrote:

I am new to using Ionic. I have successfully used Ionic view and created a very basic App using HTML5. But now I would like to create a simple App that uses SQLite, and every example I see uses ion-nav-view. I am having trouble with ion-nav-view. No matter what I add/remove/change, I only get a blank screen. and 100% of every example I find that uses ion-nav-view shows the code in piece meal instead of the whole thing, so I am left to guessing what I missed.

If you have a SIMPLE code that shows how to use "ion-nav-view" to reference other HTML pages, please send the link!!

THANK YOU!

Posts: 1

Participants: 1

Read full topic

Do i need to worry about these deprecation warnings? (during ios build in xcode)

$
0
0

@Sumeet123 wrote:

Cordova 6.0.0 latest
ionic 1.17.13 latest
ios 9
xcode 7

how to get rid of these warnings or should ignore it ? because app builds fine...

Posts: 1

Participants: 1

Read full topic

Deploy a mobile application in private/restricted App store

$
0
0

@najuru_deen wrote:

I have developed a product based mobile application which should only be available and downloadable for my consumers who are using my product.

Please help me understand how the private/restricted app store works.

Is there any way to provide a direct download link from my website?

Can I provide a direct download link for our IOS App like android?

Posts: 2

Participants: 2

Read full topic


dev_push: false, not showing up push notification

$
0
0

@Gastaldello wrote:

Hi all,

I'm starting with Ionic push notification, when I run app into emulator android (With Google API 22) if I set

$ionicAppProvider.identify({
    // The App ID (from apps.ionic.io) for the server
    'app_id': ENV.ionicAppId,
    // The public API key all services will use for this app
    'api_key': ENV.ionicPublicKey,
    // The GCM project number
    'gcm_id': ENV.gcmId,
    'dev_push': false
});

So dev_push to false push notification not showing up, PS (token and user registration works fine). If I set it to true my emulator show an alert with message...
The issue is a bug graphic I think.. Because "onNotification" callback tell me that push notification was received!!
How can I fix it?

Posts: 1

Participants: 1

Read full topic

Can't access localhost. Ionic Serve, Run and Build commands are broken

$
0
0

@tarciso_melo wrote:

Wherever I try to perform any of these commands, I get error messages:

  • ionic serve >>> Browser (Firefox or Chrome) do not connect do localhost. It only works if a set another IP using "ionic address" -> choose IP diferent from localhost -> "ionic serve".

  • ionic run android >>> "Error executing "adb devices": error: could not install smartsocket listener: cannot bind to 127.0.0.1:5037" and other things (see below)

  • ionic build android >>> "java.io.IOException: Unable to establish loopback connection" and other things (see below)

-----IMPORTANT-----
1) I have been using Ionic for 15 days, running those commands succesfully several times.
2) These errors started to occurr after I manully close the command prompt and the Android Emulator windows in the middle of an "ionic emulate" operation (such a small thing could cause these problems?).

---System Status----
Ionic 1.7.13
Node 5.5.0
Cordova 6.0.0
NPM 3.3.12
Java JDK 1.7.0_45 and 1.8.0_71
Android SDK - Almost all packages (see: http://tinypic.com/r/2irr80l/9)
Windows 8.1

---Firewalls---
Antivirus: Kaspersky -> disabled
Windows firewall -> disabled

----System variables----
JAVA_HOME C:\Program Files\Java\jdk1.8.0_71
ANDROID_HOME C:\Users\EscolhaFacil\AppData\Local\Android\android-sdk
PATH C:\Users\EscolhaFacil\AppData\Local\Android\android-sdk\platform-tools;C:\Users\EscolhaFacil\AppData\Local\Android\android-sdk\tools;C:\Users\EscolhaFacil\AppData\Roaming\npm and dozens of other things

---Solutions that I tried, but didn't solved the problem----
1) adb kill-server then adb start-server
2) adb -P 5038 start-server (start ADB server on onther port, default is :5037)
3) adb -H 192.168.1.56 start-server (start ADB server on the same IP that I get "ionic serve" to work)
4) manually kill "adb.exe" on task manager

-----Complete ERROR LOGs---------
See: http://pastebin.com/ukbRhN1w

-----Complete nestat report---------
After 'adb start-server'
After 'ionic serve' for localhost (that didn't opened on the browser)

See: http://pastebin.com/YAEW3LrR
*PID 4552 - adb.exe
*PID 5340 - node.js

Posts: 2

Participants: 2

Read full topic

Food recipe app

$
0
0

@jesst446 wrote:

hi,

Does anyone know how I would go about doing a recipe section within my app.
the users will be able to add, edit and delete recipes but also be able to view recipes that are already on the app. I am wanting to do this with firebase as the backend

any help would be greatful

thanks

Posts: 1

Participants: 1

Read full topic

Error compiling on IOS - Mac OS X El Capitan

$
0
0

@snocetti wrote:

I am having problems compiling on IOS (Mac OS X EL CAPITAN), getting this error.

IonicDeploy.m:345:27: error: no visible @interface for 'UIView' declares the selector 'loadRequest:'

Cordova CLI: 6.0.0
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.0
Ionic CLI Version: 1.7.13
Ionic App Lib Version: 0.6.5
ios-deploy version: 1.8.4
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v4.2.6
Xcode version: Xcode 7.2 Build version 7C68

-- UPDATED -- SOLVED INSTALL IOS-DEPLY, bad syntax, it is --unsafe-perm
I tried to insall ios-deploy without success...

sudo npm install -g ios-deploy --unsafe-perms=TRUE --allow-root

Exception: The loaded com.apple.CoreSimulator.CoreSimulatorService job does not match our expectations: versionOfLoadedJob: (null), our version: 201.3

Any help will be appreciated, I am not expert on XCode.

Posts: 1

Participants: 1

Read full topic

Attach single state to multiple navigation stacks

$
0
0

@arashb wrote:

Let's say I have two tabs:

1) a list of users, each with an item that goes to a user profile
2) list of teams that go to a list of users with an item that goes to a user profile

I'd like to use the same "state" within $stateProvider for both actions when I goto a user profile.

How can I accomplish this while using the same controllers, view templates, etc?

Right now, I've defined the user profile as a sub-state of tab1, so when I go to the user profile page from tab2, it jumps to tab1. I'd like to keep both navigation stack histories separate. How can I achieve this cleanly, without having to duplicate code?

Thanks!

Posts: 1

Participants: 1

Read full topic

Share data (instead of share with email, share with custom ionic app)

$
0
0

@ida_kocht wrote:

Hey guys,

I want to write an app, that just does one thing... share data with other clients (self build hardware, over internet / wlan).

Is it possible that the app is listed like whatsapp or facebook, when you click 'share with' on the phone? (especially on android)

Thanks...

Posts: 1

Participants: 1

Read full topic

Preload data with backend service - how to do?

$
0
0

@chrisribal wrote:

Hey,

i'm quite new to angular and ionic. For my first tests i want to create an app to view my invoices, edit them and manage the client data.

I'm struggeling a little bit with getting the data from my preconfigured API. On many websites and blog posts i read about loading the needed data directly when executing the neccessary controller. That means, 'InvoicesCtrl' at first loads all the invoices. Tapping on one invoice should show me the details in another controller. So 'InvoiceCtrl' loads the specific invoice in a new request. Another invoice loads the data again. And so on. That's pretty simple and easily maintainable, but is that the best way to do it?

In my city sometimes the network connection is poor and very slow. Everytime i want to load new details about an invoice, the app stucks in loading the new invoice data in a seperate request.

Wouldn't it be better to preload all the invoice data at the start of the app so i can work with it all the time without the need of loading any data again later? How would i do this? Is there any example of an angular service or factory doing this?

Thanks for your help!

Posts: 1

Participants: 1

Read full topic


cordovaSQLite plugin SELECT not always being called in ionic app

$
0
0

@zic10 wrote:

In my app we are trying to use cordovaSQLite plugin and I'm having some issues with it. This might have something to do with how the code is structured but I'm really new to both angular and Ionic. There really isn't much documentation on best practices using these plugins :frowning:
In my app.js I open the database, create tables if they don't exist, and insert some data into the tables. I've confirmed that this step works without issue. My main screen has a controller assigned to it. in the init() method I attempt to run my SELECT statement to load data from the database. However, this method doesn't seem to get called. I've stepped through the javascript in my browser debugger and noticed that sometimes when I debug it, the database SELECT calls will complete and load the data. When I run the app normally in an iOS simulator, the data never gets loaded. I suspect this may have to do with some async timing issue but I'm a bit lost as to what the problem could be. Here is the code:

      .controller('GameController', function ( $scope, $ionicModal, $cordovaSQLite) {
$scope.init = function () {

            query = "SELECT title, " +
            "from_email, " +
            "to_email, " +
            "subject, " +
            "description, " +
            "body_text, " +
            "FROM tbl_emails";

            var db = $cordovaSQLite.openDB("emails.db");

            $cordovaSQLite.execute(db, query).then(function (response) {
                for (var i = 0; i < response.rows.length; i++) {
                    var newEmailModel = new EmailModel();
                    newEmailModel.subject = response.rows.item(i).subject;
                    newEmailModel.frome = response.rows.item(i).from_email;
                    newEmailModel.bodyText = response.rows.item(i).body_text;
                    emails.push(newEmailModel);
                }
                $scope.renderEmail(emails[0]);
            }, function (err) {
                console.log("ERROR WHEN GETTING EMAILS FROM tbl_emails -> " + err.message);
            });
        };
    })

My app.js

var app = angular.module('starter', ['ionic', 'starter.controllers', 'ngCordova'])

var db = null;

app.run(function ($ionicPlatform, $cordovaSQLite, $cordovaSplashscreen) {
    $ionicPlatform.ready(function () {
        if (window.cordova && window.cordova.plugins.Keyboard) {
            // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
            // for form inputs)
            cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);

            // Don't remove this line unless you know what you are doing. It stops the viewport
            // from snapping when text inputs are focused. Ionic handles this internally for
            // a much nicer keyboard experience.
            cordova.plugins.Keyboard.disableScroll(true);
        }
        if (window.StatusBar) {
            StatusBar.styleDefault();
        }


        db = $cordovaSQLite.openDB("emails.db");
        createTables($cordovaSQLite);
        loadTables($cordovaSQLite);
        $cordovaSplashscreen.hide();

    });
})


app.config(function ($stateProvider, $urlRouterProvider) {
    $urlRouterProvider.otherwise('/')

    $stateProvider.state('home_screen', {
        url: '/',
        templateUrl: 'templates/home_screen.html',
        controller: 'GameController'
    })
})

Posts: 3

Participants: 2

Read full topic

Possible problem with JSON - Ionic

$
0
0

@Bivens wrote:

[I apologize for my English, I am not speaking]
Hi!
I am beginning with ionic (this is my first application) and I end up with a problem, likely related to JSON.

Normally when I compile with Ionic serve command, there the number 5 to be displayed instead of {{ totalQuestions}}. 5 being the total noombre issues lying in my JSON file. But the number 5 does not appear. There certainly is a problem.

Thanks for your help

Posts: 1

Participants: 1

Read full topic

Ionic subheader with avatar

$
0
0

@javelez9 wrote:

Hi to all! Today I have tryied to implement a subheader with an avatar, I tryied to put a item-avatar inside the subheader, but I didn't have luck. I have been searching in several forums without success.

Does anyone achieved to do this?

Thanks in advance!

Posts: 1

Participants: 1

Read full topic

Add Gulp task to Ionic2

$
0
0

@juliocbcotta wrote:

Hi, would like to know how to add a gulp task to my ionic2 project.
In my ionic 1.2.4 projects a gulpfile.js was aready in the root folder.

Posts: 2

Participants: 2

Read full topic

Jump from splashscreen to loading screen

$
0
0

@KimB wrote:

I tested my app on iphone 6, the splashscreen worked fine. It went from splashscreen to fading out without a glitch.

when I tried the app on iphone 4, and it didn't work as expected. It paused for a while, then it jumped down around about 12 to 15 px down. The splashscreen was off centre, then it faded after a few milliseconds.

Can someone explain why? and how can I fix this problem please?

Thanks in advance.

Posts: 2

Participants: 1

Read full topic

Viewing all 71025 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>